Esempio n. 1
0
    private void DataLoad()
    {
        ApprovalLines app = new ApprovalLines();

        UltraWebGrid2.DataSource = app.GetApprovalLine(biz_type_code, EmpID);
        UltraWebGrid2.DataBind();
    }
Esempio n. 2
0
    protected void ibtnDelete_Click(object sender, ImageClickEventArgs e)
    {
        ApprovalLines   app = new ApprovalLines();
        CheckBox        chk;
        UltraGridRow    row;
        TemplatedColumn col;
        bool            isRemoved = false;

        for (int i = 0; i < this.UltraWebGrid1.Rows.Count; i++)
        {
            row = UltraWebGrid1.Rows[i];
            col = (TemplatedColumn)row.Band.Columns.FromKey("selchk");
            chk = (CheckBox)((CellItem)col.CellItems[row.BandIndex]).FindControl("selchk");

            if (chk.Checked)
            {
                isRemoved = app.RemoveApprovalLine(row.Cells.FromKey("BIZ_TYPE_CODE").Value.ToString(), (int)row.Cells.FromKey("REP_EMP_ID").Value);
            }
        }

        if (!isRemoved)
        {
            Literal1.Text = JSHelper.GetAlertScript("삭제할 결제선을 선택해 주세요.", false);
        }
        else
        {
            Literal1.Text = JSHelper.GetAlertScript("결제선이 삭제 되었습니다.", false);
            ApprovalDatabind(ddlBizInfoList.SelectedValue, txtEmpName.Text, (txtDeptID.Text.Equals("")) ? 0 : int.Parse(txtDeptID.Text));
        }
    }
Esempio n. 3
0
    private void ApprovalDatabind(string biz_type_code, string empName, int deptId)
    {
        ApprovalLines app = new ApprovalLines();

        UltraWebGrid1.DataSource = app.ApprovalLineEmpList(biz_type_code, empName, deptId);
        UltraWebGrid1.DataBind();
    }
Esempio n. 4
0
    private void ApprovalDatabind(string biz_type_code, string empName, int deptId)
    {
        //파라메터에 존재 했던 내용 int positionId (수정 박면)
        ApprovalLines app = new ApprovalLines();

        UltraWebGrid1.DataSource = app.ApprovalLineEmpList(biz_type_code, empName, deptId);
        UltraWebGrid1.DataBind();
    }
Esempio n. 5
0
    protected void ibtnRemove_Click(object sender, ImageClickEventArgs e)
    {
        bool          isRemoved = false;
        ApprovalLines app       = new ApprovalLines();

        isRemoved = app.RemoveApprovalLine(biz_type_code, EmpID);

        if (!isRemoved)
        {
            Literal1.Text = JSHelper.GetAlertScript("삭제할 결제선이 없습니다.", false);
        }
        else
        {
            Literal1.Text = JSHelper.GetAlertOpenerControlCallBackScript("결제선이 삭제 되었습니다.", "ibtnSearch", false);
        }
        DataLoad();
    }
Esempio n. 6
0
    protected void ibtnSave_Click(object sender, ImageClickEventArgs e)
    {
        bool         isSuccessed  = false;
        int          grid2_rowcnt = this.UltraWebGrid2.Rows.Count;
        UltraGridRow row;

        ApprovalLines app = null;

        if (txtEmpID.Text != null && txtEmpID.Text.Length > 0)
        {
            //if (Request["mode"].Equals("New"))
            //{
            for (int i = 0; i < grid2_rowcnt; i++)
            {
                app         = new ApprovalLines();
                row         = this.UltraWebGrid2.Rows[i];
                isSuccessed = app.AddApprovaLline(
                    (int)row.Cells.FromKey("APP_STEP").Value
                    , (string)row.Cells.FromKey("BIZ_TYPE_CODE").Value
                    , int.Parse(txtEmpID.Text)
                    , (int)row.Cells.FromKey("APP_EMP_ID").Value);
            }

            if (isSuccessed)
            {
                Literal1.Text = JSHelper.GetAlertOpenerControlCallBackScript("결재선 지정이 완료되었습니다.", "ibtnSearch", true);
            }
            else
            {
                Literal1.Text = JSHelper.GetAlertOpenerReflashScript("결재선 지정 시 오류가 발생하였습니다.", false);
            }
            // 이하 부분 2006-06-21 박면 수정 작업 했음

            //}

            /*else if (Request["mode"].Equals("Modify"))
             * {
             *  app = new ApprovalLines();
             *  bool isRemoved = app.RemoveApprovalLine(Request["biz_type_code"], int.Parse(Request["EmpID"]));
             *
             *  if (isRemoved)
             *  {
             *      for (int i = 0; i < grid2_rowcnt; i++)
             *      {
             *          app = new ApprovalLines();
             *          row = this.UltraWebGrid2.Rows[i];
             *          isSuccessed = app.AddApprovaLline(
             *              (int)row.Cells.FromKey("APP_STEP").Value
             *              , (string)row.Cells.FromKey("BIZ_TYPE_CODE").Value
             *              , int.Parse(txtEmpID.Text)
             *              , (int)row.Cells.FromKey("APP_EMP_ID").Value);
             *      }
             *
             *      if (isSuccessed)
             *          Literal1.Text = JSHelper.GetAlertOpenerReflashScript("수정이 완료되었습니다.", true);
             *      else
             *          Literal1.Text = JSHelper.GetAlertOpenerReflashScript("수정 중 실패 하였습니다.", false);
             *
             *      return;
             *  }
             *  else
             *  {
             *      Literal1.Text = JSHelper.GetAlertOpenerReflashScript("수정 중 실패 하였습니다.", false);
             *  }
             * }*/
        }
        else
        {
            Literal1.Text = JSHelper.GetAlertOpenerReflashScript("결재 승인자를 선택하여야 합니다.", false);
        }
    }