Ejemplo n.º 1
0
    protected void btnAddMatter_Click(object sender, EventArgs e)
    {
        string Mode = "INSERT";

        if (ddlMatterNumber.SelectedIndex != 0)
        {
            if (ddlOfficeName.SelectedIndex != 0)
            {
                int Client_Name   = 0;
                int Assigened_ID  = 0;
                int superviser_ID = 0;
                int MatteType_ID  = 0;

                dt = MV.GetMatterDetails(ddlMatterNumber.SelectedValue);
                if (dt.Rows.Count > 0)
                {
                    Client_Name   = Convert.ToInt32(dt.Rows[0]["Client_Name"]);
                    Assigened_ID  = Convert.ToInt32(dt.Rows[0]["assigned_ID"]);
                    superviser_ID = Convert.ToInt32(dt.Rows[0]["superviser_ID"]);
                    MatteType_ID  = Convert.ToInt32(dt.Rows[0]["MatteType_ID"]);
                }
                try
                {
                    dt = MV.UniqueMatterNo(ddlMatterNumber.SelectedValue);
                    if (dt.Rows.Count > 0)
                    {
                        MyMessageBoxInfo.Show(MyMessageBox.MessageType.Info, "Matter Number Already Exist.", 125, 300);
                    }
                    else
                    {
                        int i = MV.MatterAction(ddlMatterNumber.SelectedValue, Client_Name, superviser_ID, Assigened_ID, MatteType_ID, Convert.ToDateTime(txtOpenDate.Text), txtMatterDiscription.Text, Convert.ToInt32(ddlOfficeName.SelectedValue), Mode);
                        if (i > 0)
                        {
                            int j = SV.AuditMatter(Convert.ToInt32(ddlMatterNumber.SelectedItem.ToString()), Mode, USERID);
                            ddlOfficeName.SelectedIndex   = 0;
                            ddlMatterNumber.SelectedIndex = 0;
                            MyMessageBoxInfo.Show(MyMessageBox.MessageType.Success, commessage.RecordSaved, 125, 300);
                        }
                    }
                }
                catch (Exception ex)
                {
                    MyMessageBoxInfo.Show(MyMessageBox.MessageType.Error, ex.Message.ToString(), 125, 300);
                }
            }
            else
            {
                MyMessageBoxInfo.Show(MyMessageBox.MessageType.Info, "Please Select office.", 125, 300);
            }
        }
        else
        {
            MyMessageBoxInfo.Show(MyMessageBox.MessageType.Info, "Please Select Matter number.", 125, 300);
        }
    }
Ejemplo n.º 2
0
 protected void GetMatterDetails(object sender, EventArgs e)
 {
     dt = MV.GetMatterDetails(ddlMatterNumber.SelectedValue);
     if (dt.Rows.Count > 0)
     {
         lblcleintdata.Text             = dt.Rows[0]["Company_Name"].ToString();
         lblResponsibalelawyerdata.Text = dt.Rows[0]["REP"].ToString();
         lblAssignedLawyerdata.Text     = dt.Rows[0]["Assigned"].ToString();
         lblmattertypedata.Text         = dt.Rows[0]["Matter_Type_Desc"].ToString();
         txtOpenDate.Text = Convert.ToDateTime(dt.Rows[0]["Date_Opend"]).ToString("dd-MMM-yyyy");
     }
     else
     {
         lblcleintdata.Text             = "";
         lblResponsibalelawyerdata.Text = "";
         lblAssignedLawyerdata.Text     = "";
         lblmattertypedata.Text         = "";
         txtOpenDate.Text = "";
         MyMessageBoxInfo.Show(MyMessageBox.MessageType.Success, commessage.NoRecordFound, 125, 300);
     }
 }