예제 #1
0
    private void BindDoctorList(string billNo, string paymentId, string companyId)
    {
        Payment_Procedure_Association_DO obj = new Payment_Procedure_Association_DO();

        obj.SZ_BILL_ID    = billNo;
        obj.SZ_PAYMENT_ID = paymentId;
        obj.SZ_COMPANY_ID = companyId;
        PaymentProcedureAssociation objProcedureAssociation = new PaymentProcedureAssociation();
        DataSet dsDoctor = objProcedureAssociation.GetPaymentProcedureAssociation(obj);

        grdProcedure.DataSource = dsDoctor;
        grdProcedure.DataBind();
        DataSet dsCode = objProcedureAssociation.GetPaymentCode(obj);

        if (dsCode.Tables.Count > 0)
        {
            if (dsCode.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < this.grdProcedure.VisibleRowCount; i++)
                {
                    for (int j = 0; j < dsCode.Tables[0].Rows.Count; j++)
                    {
                        if (grdProcedure.GetRowValues(i, new string[] { "SZ_PROC_CODE" }).ToString() == dsCode.Tables[0].Rows[j]["SZ_PROC_CODE_ID"].ToString())
                        {
                            GridViewDataColumn gridViewDataColumn = (GridViewDataColumn)this.grdProcedure.Columns[2];
                            TextBox            txtBox             = (TextBox)this.grdProcedure.FindRowCellTemplateControl(i, gridViewDataColumn, "txtProcedure");
                            txtBox.Text = dsCode.Tables[0].Rows[j]["SZ_AMOUNT_PAID"].ToString();
                            //box.Checked=true;
                        }
                    }
                }
            }
        }
    }
예제 #2
0
    public DataSet GetPaymentProcedureAssociation(Payment_Procedure_Association_DO objPayment_Proc_DO)
    {
        sqlCon = new SqlConnection(strConn);
        SqlDataReader dr;
        String        szConfigValue = "";

        ds = new DataSet();
        try
        {
            sqlCon.Open();
            sqlCmd = new SqlCommand("SP_TXN_PAYMENT_TRANSACTIONS_PROC_MAPPING", sqlCon);
            sqlCmd.CommandTimeout = Convert.ToInt32(ConfigurationManager.AppSettings["CommandTimeOut"].ToString());
            sqlCmd.CommandType    = CommandType.StoredProcedure;
            sqlCmd.Parameters.AddWithValue("@SZ_BILL_NUMBER", objPayment_Proc_DO.SZ_BILL_ID);
            sqlCmd.Parameters.AddWithValue("@SZ_COMPANY_ID", objPayment_Proc_DO.SZ_COMPANY_ID);
            sqlCmd.Parameters.AddWithValue("@FLAG", "LIST");
            sqlda = new SqlDataAdapter(sqlCmd);

            sqlda.Fill(ds);
        }
        catch (SqlException ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
        }
        finally
        {
            if (sqlCon.State == ConnectionState.Open)
            {
                sqlCon.Close();
            }
        }
        return(ds);
    }
예제 #3
0
    public void DeleteCodes(ArrayList arrObj)
    {
        sqlCon = new SqlConnection(strConn);
        SqlDataReader dr;
        String        szConfigValue = "";

        ds = new DataSet();

        try
        {
            sqlCon.Open();
            //Payment_Procedure_Association_DO objDel = new Payment_Procedure_Association_DO();
            Payment_Procedure_Association_DO objDel = (Payment_Procedure_Association_DO)arrObj[0];
            sqlCmd = new SqlCommand("SP_DELETE_ALL_PAYMENT_PROCEDURE", sqlCon);
            sqlCmd.CommandTimeout = Convert.ToInt32(ConfigurationManager.AppSettings["CommandTimeOut"].ToString());
            sqlCmd.CommandType    = CommandType.StoredProcedure;
            sqlCmd.Parameters.AddWithValue("@SZ_PAYMENT_ID", objDel.SZ_PAYMENT_ID);
            sqlCmd.Parameters.AddWithValue("@SZ_COMPANY_ID", objDel.SZ_COMPANY_ID);
            sqlCmd.ExecuteNonQuery();
        }
        catch (SqlException ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
        }
        finally
        {
            if (sqlCon.State == ConnectionState.Open)
            {
                sqlCon.Close();
            }
        }
    }
예제 #4
0
    public void SaveCode(ArrayList arrObj)
    {
        sqlCon = new SqlConnection(strConn);
        sqlCon.Open();
        SqlTransaction tr;

        tr = sqlCon.BeginTransaction();
        try
        {
            Payment_Procedure_Association_DO objDel = new Payment_Procedure_Association_DO();
            objDel = (Payment_Procedure_Association_DO)arrObj[0];
            sqlCmd = new SqlCommand("SP_TXN_PAYMENT_TRANSACTIONS_PROC_MAPPING", sqlCon);
            sqlCmd.CommandTimeout = Convert.ToInt32(ConfigurationManager.AppSettings["CommandTimeOut"].ToString());
            sqlCmd.Transaction    = tr;
            sqlCmd.CommandType    = CommandType.StoredProcedure;
            sqlCmd.Parameters.AddWithValue("@SZ_BILL_NUMBER", objDel.SZ_BILL_ID);
            sqlCmd.Parameters.AddWithValue("@SZ_PAYMENT_ID", objDel.SZ_PAYMENT_ID);
            sqlCmd.Parameters.AddWithValue("@FLAG", "DEL");
            sqlCmd.ExecuteNonQuery();

            for (int i = 0; i < arrObj.Count; i++)
            {
                Payment_Procedure_Association_DO objAdd = new Payment_Procedure_Association_DO();
                objAdd = (Payment_Procedure_Association_DO)arrObj[i];

                sqlCmd = new SqlCommand("SP_TXN_PAYMENT_TRANSACTIONS_PROC_MAPPING", sqlCon);
                sqlCmd.CommandTimeout = Convert.ToInt32(ConfigurationManager.AppSettings["CommandTimeOut"].ToString());
                sqlCmd.Transaction    = tr;
                sqlCmd.CommandType    = CommandType.StoredProcedure;
                sqlCmd.Parameters.AddWithValue("@SZ_BILL_NUMBER", objAdd.SZ_BILL_ID);
                sqlCmd.Parameters.AddWithValue("@SZ_PAYMENT_ID", objAdd.SZ_PAYMENT_ID);
                sqlCmd.Parameters.AddWithValue("@SZ_COMPANY_ID", objAdd.SZ_COMPANY_ID);
                sqlCmd.Parameters.AddWithValue("@SZ_PROC_CODE_ID", objAdd.SZ_PROC_CODE);
                sqlCmd.Parameters.AddWithValue("@SZ_AMOUNT_PAID", objAdd.SZ_AMOUNT_PAID);
                sqlCmd.Parameters.AddWithValue("@FLAG", "ADD");
                sqlCmd.ExecuteNonQuery();
            }

            tr.Commit();
        }
        catch (SqlException ex)
        {
            tr.Rollback();
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
        }
        finally
        {
            if (sqlCon.State == ConnectionState.Open)
            {
                sqlCon.Close();
            }
        }
        return;
    }
예제 #5
0
    protected void Btn_Clear_Click(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            ArrayList list = new ArrayList();

            Payment_Procedure_Association_DO t_dao = new Payment_Procedure_Association_DO();
            t_dao.SZ_PAYMENT_ID = txtPaymentId.Text;
            t_dao.SZ_COMPANY_ID = txtCompanyId.Text;
            list.Add(t_dao);

            PaymentProcedureAssociation obj = new PaymentProcedureAssociation();
            obj.DeleteCodes(list);

            for (int i = 0; i < this.grdProcedure.VisibleRowCount; i++)
            {
                GridViewDataColumn gridViewDataColumn = (GridViewDataColumn)this.grdProcedure.Columns[2];
                TextBox            txtBox             = (TextBox)this.grdProcedure.FindRowCellTemplateControl(i, gridViewDataColumn, "txtProcedure");
                txtBox.Text = "0.0";
                //CheckBox box = (CheckBox)this.grdProcedure.FindRowCellTemplateControl(i, gridViewDataColumn, "chkSelect");
                //box.Checked = false;
            }
            usrMessage.PutMessage("Codes removed Successfully");
            usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
            usrMessage.Show();
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End

        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
예제 #6
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }

        try
        {
            ArrayList list = new ArrayList();

            for (int i = 0; i < this.grdProcedure.VisibleRowCount; i++)
            {
                GridViewDataColumn gridViewDataColumn = (GridViewDataColumn)this.grdProcedure.Columns[2];
                TextBox            txtBox             = (TextBox)this.grdProcedure.FindRowCellTemplateControl(i, gridViewDataColumn, "txtProcedure");
                if (txtBox.Text != "")
                {
                    Payment_Procedure_Association_DO t_dao = new Payment_Procedure_Association_DO();
                    //t_dao.SZ_TYPE_CODE_ID = grdProcedure.GetRowValues(i, "SZ_PROC_CODE_ID").ToString();
                    t_dao.SZ_PROC_CODE   = grdProcedure.GetRowValues(i, new string[] { "SZ_PROC_CODE" }).ToString();
                    t_dao.SZ_PAYMENT_ID  = this.txtPaymentId.Text;
                    t_dao.SZ_BILL_ID     = txtBillNo.Text;
                    t_dao.SZ_COMPANY_ID  = txtCompanyName.Text;
                    t_dao.SZ_AMOUNT_PAID = txtBox.Text;
                    list.Add(t_dao);
                }
                //CheckBox box = (CheckBox)this.grdProcedure.FindRowCellTemplateControl(i, gridViewDataColumn, "chkSelect");
                //if (box.Checked)
                //{
                //    Payment_Procedure_Association_DO t_dao = new Payment_Procedure_Association_DO();
                //    //t_dao.SZ_TYPE_CODE_ID = grdProcedure.GetRowValues(i, "SZ_PROC_CODE_ID").ToString();
                //    t_dao.SZ_PROC_CODE = grdProcedure.GetRowValues(i, new string[] { "SZ_PROC_CODE" }).ToString();
                //    t_dao.SZ_PAYMENT_ID = this.txtPaymentId.Text;
                //    t_dao.SZ_BILL_ID = txtBillNo.Text;
                //    t_dao.SZ_COMPANY_ID = txtCompanyName.Text;
                //    list.Add(t_dao);
                //}
            }
            PaymentProcedureAssociation obj = new PaymentProcedureAssociation();
            obj.SaveCode(list);

            usrMessage.PutMessage("Codes added successfully");
            usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage);
            usrMessage.Show();
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End

        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }