Tuesday 7 January 2020

Multiple Search Item Depending Upon Search Parameters in SQL Stored Procedure

CREATE PROCEDURE dbo.usp_ProcName
 @Name          VARCHAR(100) 
,@FirstName     VARCHAR(100) 
,@City          VARCHAR(100) 
,@Birthday      VARCHAR(100) 
AS 
BEGIN
  SET NOCOUNT ON;

 DECLARE @sql NVARCHAR(MAX);

SET @sql = N'  select  id
                       ,name
                       ,firstname
                       ,city
                       ,birthday
                from dbo.Customers  WHERE 1 = 1'
       + CASE WHEN @Name IS NOT NULL 
              THEN N' AND Name = @Name' ELSE N' ' END 
       + CASE WHEN @FirstName IS NOT NULL 
              THEN N' AND FirstName = @FirstName' ELSE N' ' END 
       + CASE WHEN @City IS NOT NULL 
              THEN N' AND City = @City' ELSE N' ' END 
       + CASE WHEN @Birthday IS NOT NULL 
              THEN N' AND BirthDay LIKE ''%'' + @Birthday + ''%''' ELSE N' ' END 

EXECUTE sp_executesql @Sql
                    ,N'@Name VARCHAR(100) , @FirstName VARCHAR(100) 
                       @City VARCHAR(100), @BirthDay VARCHAR(100)'
                    ,@Name
                    ,@FirstName
                    ,@City
                    ,@Birthday 
END

Wednesday 28 December 2016

Update one Table Column from other table column With Some Matching

UPDATE    SwachhAbhiyanSurvey

SET              Officer_id = t1.SRNo

FROM         officer_user AS t1 RIGHT OUTER JOIN

                      SwachhAbhiyanSurvey ON t1.GPAlloted = SwachhAbhiyanSurvey.PANCHAYAT_NAME

Wednesday 23 November 2016

Send E-mail From C# Code Some

Step need to Follow
Problem Solutions on Issue Related

try
        {
            MailMessage Msg = new MailMessage();
            // Sender e-mail address.
            Msg.From = new MailAddress(txtemail.Text);
            // Recipient e-mail address.
            Msg.To.Add("kiit.kurukshetra@gmail.com");
            Msg.Subject = "Message From Website by: " + txtname.Text + " Contact him at " + txtmob.Text+" Facbook id "+txtfbid.Text+" E-mail: "+txtemail.Text;
            Msg.Body = txtmessage.Text + "<br/> Message From:" + txtname.Text + ", Address: " + txtadd.Text;
            // your remote SMTP server IP.
            SmtpClient smtp = new SmtpClient();
            smtp.Host = "smtp.gmail.com";
            smtp.Port = 587;
            smtp.Credentials = new System.Net.NetworkCredential("nickkr27@gmail.com", "kkr1234567");
            smtp.EnableSsl = true;
            smtp.Send(Msg);
            Msg = null;
            lbltxt.Text = "Sent Get Back you soon";
         
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }

Friday 29 April 2016

Food Supply Software for Confed

Software developed for confed to manage the depot holders their stock, billing and inventory. The software is in development process till date 29/04/2016. All the updates and usage guide will be posted in comments.

How to Display Account Statements and Report??

Select Any Centre/Block/Depot Holder
and click generate report. 

Friday 15 April 2016

Hospital Management System (Dot Net, C#, SQL Server)

Hospital Management System Student Project Developed in Dot Net C#, with SQL Server Database.
Available full source code, Please enter your Email ID, or Contact administrator for the source.

Sunday 13 March 2016

Petrol Pump Software (Cash Management, Accounting, Billing, Expenditure)

Petrol Pump Software.


  • Daily Cash Management.
  • Machine Reading Calculation.
  • Cash and Credit Entries
  • Party Creation Facility.
  • Credit Management.
  • Billing of Credit Parties.
  • Day Book Display
  • Party Wise Account Statements.
  • Daily Expenses Entries.
  • Salary Calculation of Staff.

Download Software