コード例 #1
0
 /// <summary>
 /// 修改医生信息
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnUpdateProject_Click(object sender, EventArgs e)
 {
     if (Common.CheckIsNotNull(this, "TxtDocName", "医生名称") && Common.CheckIsNotNull(this, "TxtDocNo", "医生编号") && Common.CheckIsNotNull(this, "TxtDocPinYin", "医生拼音查询码") && Common.CheckLpIsNotNull(this, "LpDes", "医生职称") && Common.CheckLpIsNotNull(this, "LpDept", "科室"))
     {
         SetDoctorArgs();
         Models.DoctorManageModel model = new Models.DoctorManageModel();
         int i = model.CheckDocIsRepeat(doctorArgs.DoctorNo, doctorArgs.DoctorId);
         if (i == 0)
         {
             if (CJia.Health.Tools.Message.ShowQuery("是否修改此医生信息", CJia.Health.Tools.Message.Button.YesNo) == CJia.Health.Tools.Message.Result.Yes)
             {
                 OnUpdateDoctor(null, doctorArgs);
                 LoadData();
             }
             else
             {
                 return;
             }
         }
         else
         {
             MessageBox.Show("此医生编号已存在");
             TxtDocNo.Focus();
         }
     }
     else
     {
         return;
     }
 }
コード例 #2
0
 protected void btnEdit_Click(object sender, EventArgs e)
 {
     ModalPopUpDocNum.Show();
     TxtDocNo.Focus();
     Upanelcust.Update();
     Bindcustomer();
 }
コード例 #3
0
    protected void BtnGetSpecimanDetails_Click(object sender, EventArgs e)
    {
        btn_Save.Visible        = true;
        Session["tempBookData"] = null;
        int DocNum = Convert.ToInt32(TxtDocNo.Text.ToString());


        DataTable dt = new DataTable();

        // bool condition = false;

        dt = Specimen.Get_SpecimenMasterBy_DocNum(DocNum, "0").Tables[0];

        if (dt.Rows.Count > 0)
        {
            txtGCN.Text = dt.Rows[0]["DocumentNo"].ToString();
            txtSCN.Text = dt.Rows[0]["ChallanNo"].ToString();
            //txtChalDate.Text = dt.Rows[0]["ChallanDate"].ToString();
            //txtorder.Text = dt.Rows[0]["OrderNo"].ToString();
            //txtsalemanCode.Text = dt.Rows[0]["SalesmanCode"].ToString();
            //lblSalesManName.Text = dt.Rows[0]["SalesmanName"].ToString();
            //  txtOrdDate.Text = dt.Rows[0]["OrderDate"].ToString();
            txtCNDate.Text     = dt.Rows[0]["DocumentDate"].ToString();
            txtspInstruct.Text = dt.Rows[0]["SpInstruction"].ToString();
            //DataSet ds = new DataSet();
            //ds = SpecimanDetails.GetSpecimenDatilsByEmpCode(Convert.ToString(DocNum), "documentno");

            DataTable dt1 = new DataTable();
            if (Session["tempBookData"] != null)
            {
                Session["tempBookData"] = fillTempBookData(DocNum.ToString(), "get");
                dt1 = (DataTable)Session["tempBookData"];
            }
            else
            {
                Session["tempBookData"] = fillTempBookData(DocNum.ToString(), "get");
                dt1 = (DataTable)Session["tempBookData"];
            }
            grdBookDetails.DataSource = dt1;
            grdBookDetails.DataBind();
            grdBookDetails.Columns[7].Visible = true;
            grdBookDetails.Columns[8].Visible = true;
            //DataTable dt3 = new DataTable();
            //dt3 = ds.Tables[0];
            //Session["tempBookData"] = dt3;
            grdBookDetails.Visible = true;
            //  btn_Save.Visible = false;
        }
        else
        {
            message("Record not found for document no. " + TxtDocNo.Text);
            TxtDocNo.Text = "";
            TxtDocNo.Focus();
            btn_Save.Visible = false;
        }
    }
コード例 #4
0
    protected void BtnGetDCDetails_Click(object sender, EventArgs e)
    {
        //ModalPopUpDocNum.Hide();
        //Session["tempDCData"] = null;

        int DocNum = Convert.ToInt32(TxtDocNo.Text.Trim());


        DataTable dt = new DataTable();

        dt = PurchaseMaster.Get_PurchaseDetails(DocNum, Convert.ToDateTime("2011/01/01"), Convert.ToDateTime("2011/01/01")
                                                , Convert.ToInt32(strFY), "ACEDIT", 0, 0).Tables[0];

        if (dt.Rows.Count > 0)
        {
            lblshow.Text      = dt.Rows[0]["SuppliersRef"].ToString();
            txtSupplier.Text  = dt.Rows[0]["SuppliersRefCode"].ToString();
            txtPurchase.Text  = dt.Rows[0]["PurchaseCode"].ToString();
            lblpurchase.Text  = dt.Rows[0]["PurchaseName"].ToString();
            txtDate.Text      = dt.Rows[0]["InvoiceDate"].ToString();
            txtInvoiceNo.Text = dt.Rows[0]["InvoiceNo"].ToString();
            lblID.Text        = dt.Rows[0]["PurchaseMasterID"].ToString();

            try
            {
                //txtPercentage.Text = dt.Rows[0]["vat"].ToString();
                txtVatAmt.Text         = dt.Rows[0]["vat"].ToString();
                ddlmsoms.SelectedValue = dt.Rows[0]["ms_oms"].ToString();
                ddlVat.SelectedValue   = dt.Rows[0]["vat"].ToString();
                txtremark.Text         = dt.Rows[0]["remark"].ToString();
            }
            catch (Exception ex)
            {
            }
            gvPurchasing.DataSource = dt;
            gvPurchasing.DataBind();
            Session["tempdata"] = dt;
            btn_Save.Visible    = true;
            txtCode.Text        = "MIS";
            txtQuantity.Text    = "1";
            txtRate.Focus();
        }
        else
        {
            message("Record not found for document no. " + TxtDocNo.Text);
            ModalPopUpDocNum.Show();
            TxtDocNo.Text = "";
            TxtDocNo.Focus();
            btn_Save.Visible = false;
        }
    }
コード例 #5
0
 /// <summary>
 /// 添加一条医生信息
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnAddProject_Click(object sender, EventArgs e)
 {
     if (Common.CheckIsNotNull(this, "TxtDocName", "医生名称") && Common.CheckIsNotNull(this, "TxtDocNo", "医生编号") && Common.CheckIsNotNull(this, "TxtDocPinYin", "医生拼音查询码"))
     {
         SetDoctorArgs();
         Models.DoctorManageModel model = new Models.DoctorManageModel();
         doctorArgs.DoctorId = " ";
         int i = model.CheckDocIsRepeat(doctorArgs.DoctorNo, doctorArgs.DoctorId);
         if (i == 0)
         {
             if (CJia.Health.Tools.Message.ShowQuery("是否添加此医生信息", CJia.Health.Tools.Message.Button.YesNo) == CJia.Health.Tools.Message.Result.Yes)
             {
                 if (checkBox.Checked)
                 {
                     OnCheckDoctorNo(null, doctorArgs);
                     if (isDocNoHave)
                     {
                         MessageBox.Show("此工号已有用户使用,请更改!");
                         TxtDocNo.Focus();
                         TxtDocNo.SelectAll();
                         return;
                     }
                     else
                     {
                         OnInsertUserDoc(null, doctorArgs);
                     }
                 }
                 else
                 {
                     OnInsertDoctor(null, doctorArgs);
                 }
                 LoadData();
             }
             else
             {
                 return;
             }
         }
         else
         {
             MessageBox.Show("此医生编号已存在");
             TxtDocNo.Focus();
         }
     }
     else
     {
         return;
     }
 }
コード例 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY = Session["FY"].ToString();
            }
            else
            {
                Session.Clear();
            }
        }
        if (!IsPostBack)
        {
            //SetView();
            // BindExpensehead();
            ModalPopUpDocNum.Show();

            lblID.Text                    = "0";
            lblID1.Text                   = "0";
            lbl2ID.Text                   = "0";
            Session["tempdata"]           = null;
            pnlpurch.Visible              = true;
            btn_Save.Visible              = true;
            gvPurchasing.Visible          = true;
            lblDescriptionofGoods.Visible = true;
            SetView();
            fillddlVat();
            //  txtPurchase.Focus();

            try
            {
                txtDate.Text = System.DateTime.Now.ToString("dd/MM/yyyy");
            }
            catch
            {
            }
            if (gvPurchasing.Rows.Count <= 0)
            {
                lblGrandTot.Text = "0";
                lblVatAmt.Text   = "0";
                lblSubTotal.Text = "0";
            }
            TxtDocNo.Focus();
        }
    }
コード例 #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["ChetanaCompanyName"] != "" || Session["ChetanaCompanyName"] != null)
        {
            if (Session["FY"] != "" || Session["FY"] != null)
            {
                strChetanaCompanyName = Session["ChetanaCompanyName"].ToString();
                strFY = Session["FY"].ToString();
            }
            else
            {
                Session.Clear();
            }
        }
        if (!Page.IsPostBack)
        {
            GetValidation(3, Convert.ToInt32(Session["Role"]));
            ModalPopUpDocNum.Show();
            TxtDocNo.Focus();

            string grp = "BookSet";
            DDLSelectSet.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(grp, "DropDown");
            DDLSelectSet.DataBind();
            DDLSelectSet.Items.Insert(0, new ListItem("-Select book set-", "0"));

            string std = "Standard";
            DDLstandard.DataSource = Masterofmaster.Get_MasterOfMaster_ByGroup_ForDropdown(std, "DropDown");
            DDLstandard.DataBind();
            DDLstandard.Items.Insert(0, new ListItem("-STD-", "0"));
            //   txtdocDate.Text = DateTime.Now.ToString(sDateFormat);
            txtChalDate.Text = DateTime.Now.ToString(sDateFormat);
            //  txtDeliverydte.Text = DateTime.Now.ToString(sDateFormat);
            //    txtOrdDate.Text = DateTime.Now.ToString(sDateFormat);
            //txtorder.Focus();
            Session["tempDCData"] = null;
            // Openpopup(2).;
            // btncancel.Visible = false;
            //Session["tempDCData"] = null;
            Bindcustomer();
            // DCMaster.Get_Transporter(custcode);
            lblZoneCode.Visible = false;
            DDLZone.Visible     = false;
        }
    }
コード例 #8
0
    protected void BtnGetDCDetails_Click(object sender, EventArgs e)
    {
        //ModalPopUpDocNum.Hide();
        //Session["tempDCData"] = null;

        int DocNum = Convert.ToInt32(TxtDocNo.Text.Trim());

        Session["purDocNo"] = TxtDocNo.Text.Trim();

        DataTable dt = new DataTable();

        dt = PurchaseMaster.Get_PurchaseDetails(DocNum, Convert.ToDateTime("2011/01/01"), Convert.ToDateTime("2011/01/01")
                                                , Convert.ToInt32(strFY), "EDIT", 0, 0).Tables[0];

        if (dt.Rows.Count > 0)
        {
            lblshow.Text      = dt.Rows[0]["SuppliersRef"].ToString();
            txtSupplier.Text  = dt.Rows[0]["SuppliersRefCode"].ToString();
            txtPurchase.Text  = dt.Rows[0]["PurchaseCode"].ToString();
            lblpurchase.Text  = dt.Rows[0]["PurchaseName"].ToString();
            txtDate.Text      = dt.Rows[0]["InvoiceDate"].ToString();
            txtInvoiceNo.Text = dt.Rows[0]["InvoiceNo"].ToString();
            lblID.Text        = dt.Rows[0]["PurchaseMasterID"].ToString();

            gvPurchasing.DataSource = dt;
            gvPurchasing.DataBind();
            Session["tempdata"] = dt;
        }
        else
        {
            message("Record not found for document no. " + TxtDocNo.Text);
            ModalPopUpDocNum.Show();
            TxtDocNo.Text = "";
            TxtDocNo.Focus();
            btn_Save.Visible = false;
        }
    }
コード例 #9
0
    protected void BtnGetSpecimanDetails_Click(object sender, EventArgs e)
    {
        lblIsPartialC.Text      = "false";
        Session["tempBookData"] = null;
        if (TxtDocNo.Text == "")
        {
            message("Please enter Document no.");
            ClearData();
        }
        else
        {
            int       DocNum     = Convert.ToInt32(TxtDocNo.Text.ToString());
            DataTable dt         = new DataTable();
            bool      condition1 = false;

            dt = Specimen.Get_SpecimenMasterBy_DocNum(DocNum, "1").Tables[0];

            if (dt.Rows.Count > 0)
            {
                condition1         = Convert.ToBoolean(dt.Rows[0]["IsConfirm"]);
                condition1         = false;
                lblIsPartialC.Text = dt.Rows[0]["IsPartialConfirmed"].ToString();
            }
            if (condition1 == true)
            {
                // grdBookDetails.Visible = true;
                btncancel.Visible = false;
                message("Record not found for document no. " + TxtDocNo.Text);
                TxtDocNo.Text = "";
                TxtDocNo.Focus();
                ClearData();
            }
            else if (dt.Rows.Count == 0)
            {
                message("Record not found for document no. " + TxtDocNo.Text);
                btncancel.Visible = false;
                TxtDocNo.Text     = "";
                TxtDocNo.Focus();
                ClearData();
            }
            else
            {
                btncancel.Visible = true;

                if (dt.Rows.Count > 0)
                {
                    lbldocno.Text    = dt.Rows[0]["DocumentNo"].ToString();
                    lblchalanno.Text = dt.Rows[0]["ChallanNo"].ToString();
                    lblchaldate.Text = dt.Rows[0]["ChallanDate"].ToString();
                    lblorderno.Text  = dt.Rows[0]["OrderNo"].ToString();
                    //txtsalemanCode.Text = dt.Rows[0]["SalesmanCode"].ToString();
                    lblsalesman.Text  = dt.Rows[0]["SalesmanName"].ToString();
                    lblorderdate.Text = dt.Rows[0]["OrderDate"].ToString();
                    lbldocdate.Text   = dt.Rows[0]["DocumentDate"].ToString();
                    DataTable dt1 = new DataTable();
                    Session["tempBookData"] = fillTempBookData(DocNum.ToString(), "get");
                    dt1 = (DataTable)Session["tempBookData"];
                    grdBookDetails.DataSource = dt1;
                    grdBookDetails.DataBind();
                    grdBookDetails.Visible = true;
                    //btn_Save.Visible = false;
                    //btncancel.Visible = false;
                }
            }
        }
    }
コード例 #10
0
    protected void BtnGetDCDetails_Click(object sender, EventArgs e)
    {
        String cd = "";

        ModalPopUpDocNum.Hide();
        Session["tempDCData"] = null;

        int DocNum = Convert.ToInt32(ddldocno.SelectedValue);


        //  bool condition = false;
        cd = "1";
        DataSet   ds     = DCMaster.Get_DCMasterBy_DocNum(DocNum, "1");
        DataTable dt     = ds.Tables[0];
        DataTable dtzone = ds.Tables[2];

        cd = "2";
        if (dt.Rows.Count > 0)
        {
            txtdocnew.Text   = dt.Rows[0]["DocumentNo_New"].ToString();
            txtdoc.Text      = dt.Rows[0]["DocumentNo"].ToString();
            txtchalan.Text   = dt.Rows[0]["ChallanNo"].ToString();
            txtChalDate.Text = dt.Rows[0]["ChallanDate"].ToString();
            txtorder.Text    = dt.Rows[0]["OrderNo"].ToString();
            txtcustomer.Text = dt.Rows[0]["CustCode"].ToString();
            lblCustName.Text = dt.Rows[0]["CustName"].ToString();
            DDlemployee.Items.Clear();
            cd = "3";
            try
            {
                DDlemployee.DataSource = DCMaster.Get_Employee_By_Customer_Code(txtcustomer.Text.ToString(), "Employee");
                DDlemployee.DataBind();
                cd = "4";
                if (DDlemployee.Items.Count > 0)
                {
                    DDlemployee.SelectedValue = dt.Rows[0]["SalesmanCode"].ToString();
                    cd = "5";
                    DDlemployee.SelectedItem.Text = dt.Rows[0]["SalesmanName"].ToString();
                    cd = "6";
                }
                txtOrdDate.Text    = dt.Rows[0]["OrderDate"].ToString();
                txtdocDate.Text    = dt.Rows[0]["DocumentDate"].ToString();
                txtpIncharge.Text  = dt.Rows[0]["PIncharge"].ToString();
                txtspInstruct.Text = dt.Rows[0]["SpInstruction"].ToString();
                txtbankdet.Text    = dt.Rows[0]["BankCode"].ToString();
                lblbankname.Text   = dt.Rows[0]["BankName"].ToString();
                cd = "7";
                //Extra Zone Code Bind
                if (dtzone.Rows.Count > 0)
                {
                    lblZoneCode.Visible = true;
                    DDLZone.Visible     = true;
                    DDLZone.Items.Clear();
                    DDLZone.DataSource = ds.Tables[2];
                    DDLZone.DataBind();
                    if (dt.Rows[0]["ExtraZoneCode"].ToString() != "")
                    {
                        //DDLZone.SelectedValue = dt.Rows[0]["ExtraZoneCode"].ToString();
                    }
                }
                else
                {
                    DDLZone.Items.Clear();
                    lblZoneCode.Visible = false;
                    DDLZone.Visible     = false;
                }


                txtDeliverydte.Text = Convert.ToDateTime(DCMaster.Get_DCMasterBy_DocNum(DocNum, "0").Tables[1].Rows[0]["DeliveryDate"].ToString()).ToString("dd/MM/yyyy");
                UpdatePanel14.Update();
            }
            catch (Exception ex)
            {
                MessageBox(cd);
                //Response.Write(ex.Message.ToString());
            }

            // Bind_DDL_Transport();
            //  Ddltransport.SelectedValue = dt.Rows[0]["TransportID"].ToString();
            if (dt.Rows[0]["TransporterCode"].ToString() == "Trans")
            {
                lbltransporter.Visible = false;
                lbltransporter.Text    = dt.Rows[0]["TransporterCode"].ToString();

                txttransporter.Text = dt.Rows[0]["Transporter"].ToString();
            }
            else
            {
                txttransporter.Text    = dt.Rows[0]["TransporterCode"].ToString();
                lbltransporter.Visible = true;
                lbltransporter.Text    = dt.Rows[0]["Transporter"].ToString();
            }
            //DataSet ds = new DataSet();
            // ds = SpecimanDetails.GetSpecimenDatilsByEmpCode(Convert.ToString(DocNum), "documentno");

            DataTable dt1 = new DataTable();
            if (Session["tempDCData"] != null)
            {
                Session["tempDCData"] = fillTempBookData(DocNum.ToString(), "get");
                dt1 = (DataTable)Session["tempDCData"];
            }
            else
            {
                Session["tempDCData"] = fillTempBookData(DocNum.ToString(), "get");
                dt1 = (DataTable)Session["tempDCData"];
            }

            grdBookDetails.DataSource = dt1;
            grdBookDetails.DataBind();
            grdBookDetails.Columns[5].Visible = true;
            grdBookDetails.Columns[4].Visible = true;
            btn_Save.Visible = true;
            //DataTable dt3 = new DataTable();
            //dt3 = ds.Tables[0];
            //Session["tempDCData"] = dt3;
            grdBookDetails.Visible = true;
            //  btn_Save.Visible = false;
        }
        else
        {
            message("Record not found for document no. " + TxtDocNo.Text);
            ModalPopUpDocNum.Show();
            TxtDocNo.Text = "";
            TxtDocNo.Focus();
            btn_Save.Visible = false;
        }
    }