Ejemplo n.º 1
0
    private void BindingPosBiz(string pos_knd_id)
    {
        Biz_PositionKindBizMaps posKndBiz = new Biz_PositionKindBizMaps();
        DataSet ds = posKndBiz.GetPosKndBizMap(pos_knd_id, "");

        UltraWebGrid2.DataSource = ds;
        UltraWebGrid2.DataBind();
    }
Ejemplo n.º 2
0
    private void KndBizMapGridBinding()
    {
        Biz_PositionKindBizMaps maps = new Biz_PositionKindBizMaps();

        DataSet ds = maps.GetPosKndBizMaps();

        UltraWebGrid2.DataSource = ds;
        UltraWebGrid2.DataBind();
    }
Ejemplo n.º 3
0
    protected void UltraWebGrid3_InitializeRow(object sender, RowEventArgs e)
    {
        DataRowView drw = (DataRowView)e.Data;

        Biz_PositionKindBizMaps kndBizMap = new Biz_PositionKindBizMaps();

        TemplatedColumn cCol   = (TemplatedColumn)e.Row.Band.Columns.FromKey("CHK_BOX");
        CheckBox        objchk = (CheckBox)((CellItem)cCol.CellItems[e.Row.BandIndex]).FindControl("cBox");

        objchk.Checked = kndBizMap.IsExist(this.hdfPoskndID.Value, drw["POS_BIZ_ID"].ToString());
    }
Ejemplo n.º 4
0
    public static void BindKndBiz(TreeView treeView)
    {
        string valueStr_knd = "POS_KND_ID";
        string textStr_knd  = "POS_KND_NAME";
        string valueStr_biz = "POS_BIZ_ID";
        string textStr_biz  = "POS_BIZ_NAME";

        string imageUrlDir = "../images/dept_icon/";

        Biz_PositionKinds posKind = new Biz_PositionKinds();
        DataTable         dtKnd   = posKind.GetPositionKinds().Tables[0];

        Biz_PositionKindBizMaps posKndBiz = new Biz_PositionKindBizMaps();
        DataTable dtKndBiz = posKndBiz.GetPosKndBizMaps().Tables[0];

        TreeNode rootNode = CreateNode("", "Root", imageUrlDir + "purple/R.gif", true, TreeNodeSelectAction.None, false);

        treeView.Nodes.Add(rootNode);

        foreach (DataRow dbRowKnd in dtKnd.Rows)
        {
            TreeNode newNode = CreateNode(dbRowKnd[valueStr_knd].ToString()
                                          , dbRowKnd[textStr_knd].ToString()
                                          , imageUrlDir + "blue/k.gif"
                                          , false
                                          , TreeNodeSelectAction.Expand
                                          , false);

            rootNode.ChildNodes.Add(newNode);

            DataRow[] drArrBiz = dtKndBiz.Select(string.Format(@"POS_KND_ID = '{0}'", dbRowKnd["POS_KND_ID"]));

            foreach (DataRow drBiz in drArrBiz)
            {
                TreeNode newChildNode = CreateNode(drBiz[valueStr_biz].ToString()
                                                   , drBiz[textStr_biz].ToString()
                                                   , imageUrlDir + "red/b.gif"
                                                   , false
                                                   , TreeNodeSelectAction.Select
                                                   , false);

                newNode.ChildNodes.Add(newChildNode);
            }
        }
    }
Ejemplo n.º 5
0
    protected void ibnSave_Click(object sender, ImageClickEventArgs e)
    {
        string strIdxs = UltraGridUtility.GetCheckBoxValues(UltraWebGrid3
                                                            , "CHK_BOX"
                                                            , "cBox"
                                                            , "POS_BIZ_ID");

        string[] pos_biz_ids = strIdxs.Substring(0, strIdxs.Length - 1).Split(';');


        Biz_PositionKindBizMaps positionKindBizMap = new Biz_PositionKindBizMaps();

        DataTable dataTable = positionKindBizMap.GetDataTableSchema();
        DataRow   row       = null;


        for (int i = 0; i < pos_biz_ids.Length; i++)
        {
            DataRow dataRow = dataTable.NewRow();

            dataRow["POS_KND_ID"] = this.hdfPoskndID.Value;
            dataRow["POS_BIZ_ID"] = pos_biz_ids[i].ToString();
            dataRow["DATE"]       = DateTime.Now;
            dataRow["USER"]       = gUserInfo.Emp_Ref_ID;

            dataTable.Rows.Add(dataRow);
        }


        bool bResult = positionKindBizMap.ModifyPosKndBizMap(this.hdfPoskndID.Value, dataTable);

        if (bResult)
        {
            SelectBizGridBinding(hdfPoskndID.Value);
            KndBizMapGridBinding();
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertBackScript("수정되지 않았습니다.");
            return;
        }
    }