Ejemplo n.º 1
0
 public int UpdateSampleStageInfo(SampleStage sample)
 {
     try
     {
         using (SampleStageGateway sampleStageGateway = new SampleStageGateway())
         {
             actionResult = sampleStageGateway.UpdateSampleStage(sample);
         }
     }
     catch (Exception ex)
     {
     }
     return(actionResult);
 }
Ejemplo n.º 2
0
    public DataTable InsertSampleStage(SampleStage sample)
    {
        DataTable dt = null;

        try
        {
            using (SampleStageGateway sampleStageGateway = new SampleStageGateway())
            {
                dt = sampleStageGateway.InsertsampleStage(sample);
            }
        }
        catch (Exception ex)
        {
        }
        return(dt);
    }
Ejemplo n.º 3
0
    public string LoadsampleStage()
    {
        StringBuilder tableRow = new StringBuilder();

        try
        {
            using (SampleStageGateway sampleStageGateway = new SampleStageGateway())
            {
                int       count = 0;
                DataTable dt    = sampleStageGateway.LoadSampleStage();
                if (dt.Rows.Count > 0)
                {
                    tableRow.Append("<table class='table table-bordered'><thead><tr class='success'>" +
                                    "<th style=' width: 25 %; text-align:center;padding: 10px; color: #FFFFFF; background-color:#0099FF;border: 2px solid #ffffff;'>Serial No</th>" +
                                    "<th style=' width: 25 %; text-align:center;padding: 10px; color: #FFFFFF; background-color:#0099FF;border: 2px solid #ffffff;'>Buyer Name</th>" +
                                    "<th style=' width: 25 %; text-align:center;padding: 10px; color: #FFFFFF; background-color:#0099FF;border: 2px solid #ffffff;'>Sample Stage</th>" +
                                    "<th style=' width: 25 %; text-align:center;padding: 10px; color: #FFFFFF; background-color:#0099FF;border: 2px solid #ffffff;'>IsActive</th>" +
                                    "<th style=' width: 25 %; text-align:center;padding: 10px; color: #FFFFFF; background-color:#0099FF;border: 2px solid #ffffff;'>Action</th>" +
                                    "</tr></thead >");
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        count++;

                        tableRow.Append("<tbody><tr style='background-color:lavender;'>");

                        tableRow.Append("<td style='width: 25 %;text-align:center;border: 2px solid #ffffff;padding:5px;color: black;'>" + count + "</td>");
                        tableRow.Append("<td style='width: 25 %;text-align:center;border: 2px solid #ffffff;padding:5px;color: black;'>" + dt.Rows[i]["BuyerName"] + "</td>");
                        tableRow.Append("<td style='width: 25 %;text-align:center;border: 2px solid #ffffff;padding:5px;color: black;'>" + dt.Rows[i]["SampleStageName"] + "</td>");
                        tableRow.Append("<td style='width: 25 %;text-align:center;border: 2px solid #ffffff;padding:5px;color: black;'>" + dt.Rows[i]["IsActive"] + "</td>");
                        tableRow.Append("<td style='width: 25 %;text-align:center;border: 2px solid #ffffff;padding:5px;color: black;'><a href='SampleStageEntry.aspx?Id=" + dt.Rows[i]["SampleStageId"] + "'>Edit</a></td>");
                        tableRow.Append("</tr></tbody>");
                    }
                    tableRow.Append("</table>");
                }
                else
                {
                    tableRow.Append("No Data Found");
                }
            }
        }
        catch (Exception ex)
        {
        }
        return(tableRow.ToString());
    }
Ejemplo n.º 4
0
    public void LoadFoeUpdate(int buyerId)
    {
        DataTable dt = null;

        try
        {
            using (SampleStageGateway sampleGateway = new SampleStageGateway())
            {
                dt = sampleGateway.LoadDataForUpdate(loadSampleId);
                if (dt.Rows.Count > 0)
                {
                    buyerNameDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["BuyerId"]);
                    sampleStageTextBox.Text             = Convert.ToString(dt.Rows[0]["SampleStageName"]);
                    isActiveHiddenField.Value           = Convert.ToString(dt.Rows[0]["IsActive"]);
                    isAcctiveDropDownList.SelectedValue = Convert.ToString(isActiveHiddenField.Value);
                }
            }
        }
        catch (Exception ex)
        {
        }
    }