Exemple #1
0
    protected string initLevel2Menu(string prtID, string roleID)
    {
        string resultHtml = "";
        string query      = "select distinct t.f_role ,t.f_right,q.name as prtName,q.menulevel ,q.ID as prtID from  ht_svr_sys_role t left join ht_svr_sys_menu s on substr(t.f_right,to_number(s.f_ID),1) ='1' and s.f_type = '0' and s.is_del = '0'  left join ht_svr_prt_menu q on q.id = s.f_pid  and q.pid = '" + prtID + "'  where  q.menulevel = '2' and t.f_id = '" + roleID + "' order by q.ID";

        MSYS.DAL.DbOperator opt  = new MSYS.DAL.DbOperator();
        DataSet             data = opt.CreateDataSetOra(query);

        resultHtml += "<ul style='height: 300px;'>\r\n";
        resultHtml += addChildMenu(prtID, roleID);
        if (data != null && data.Tables[0].Rows.Count > 0)
        {
            foreach (DataRow row in data.Tables[0].Rows)
            {
                resultHtml += " <li><cite></cite><a class='subhead'>" + row["prtName"].ToString() + "</a>\r\n";
                resultHtml += "<ul>\r\n";
                resultHtml += addChildMenu(row["prtID"].ToString(), roleID);
                resultHtml += "</ul>\r\n";
                resultHtml += "</li>\r\n";
            }
        }
        resultHtml += "</ul>\r\n";

        return(resultHtml);
    }
Exemple #2
0
    protected void listtype_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList list     = (DropDownList)sender;
        int          rowindex = ((GridViewRow)list.NamingContainer).RowIndex;
        DropDownList listpara = (DropDownList)GridView1.Rows[rowindex].FindControl("listPara");

        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();

        opt.bindDropDownList(listpara, "select para_code,para_name from ht_pub_tech_para  where para_type like '1%' and substr(para_code,1,5) = '" + list.SelectedValue + "' and is_del = '0'", "para_name", "para_code");
    }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         BindData();
         MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
         System.Diagnostics.Debug.WriteLine("正在初始化下拉菜单");
         opt.bindDropDownList(energyConsumptionPoint, "SELECT DISTINCT ENG_CODE, ENG_NAME FROM HT_ENG_CONSUMPTION_ITEM WHERE IS_DEL!=1 AND IS_VALID =1", "ENG_NAME", "ENG_CODE");
     }
 }
Exemple #4
0
    protected void Delete_Click(object sender, EventArgs e)
    {
        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
        string query            = "delete from ht_qlt_collection where para_code = '" + txtID.Text + "'";
        string log_message      = opt.UpDateOra(query) == "Success" ? "删除数采条件成功" : "删除数采条件失败";

        log_message += "--标识:" + txtID.Text;
        InsertTlog(log_message);
        setBlank();
    }
Exemple #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.PageLoad(sender, e);
     if (!IsPostBack)
     {
         tvHtml = InitTree();
         MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
         opt.bindDropDownList(listSection, "select * from ht_pub_tech_section where is_del = '0' and is_valid = '1' order by section_code", "Section_NAME", "SECTION_CODE");
     }
 }
Exemple #6
0
    protected void btnModify_Click(object sender, EventArgs e)
    {
        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();

        {
            string[] seg   = { "PROCESS_CODE", "PROCESS_NAME", "REMARK", "IS_VALID", "CREATE_ID", "CREATE_TIME" };
            string[] value = { txtCode.Text, txtName.Text, txtDscrp.Text, Convert.ToInt16(rdValid.Checked).ToString(), ((MSYS.Data.SysUser)Session["user"]).id, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") };
            opt.MergeInto(seg, value, 1, "HT_PUB_INSPECT_PROCESS");
        }
    }
Exemple #7
0
    protected void bindGrid(string qlt_code, string section)
    {
        string query = "select g1.PARA_CODE as 参数编码,g1.lower as 下限,g1.upper as 上限,g1.QLT_TYPE as 考核类型,g1.MINUS_SCORE as 超限扣分,g1.REMARK as 备注 from ht_QLT_stdd_code_detail g1 left join ht_pub_tech_para g2 on g2.para_code = g1.para_code where g1.is_del = '0' and  g2.para_type like '______1%'  and g1.qlt_code = '" + qlt_code + "' and substr(g1.para_code,1,5) = '" + section + "'";

        MSYS.DAL.DbOperator opt  = new MSYS.DAL.DbOperator();
        DataSet             set  = opt.CreateDataSetOra(query);
        DataTable           data = set.Tables[0];

        bindgrid(data, hideprc.Value);
    }
Exemple #8
0
    protected void bindGrid()
    {
        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
        string query            = "select F_USER as 用户,F_COMPUTER as 操作站,F_TIME as 时间,F_DESCRIPT as 描述  from HT_SVR_LOGIN_RECORD  where F_TIME between '" + StartTime.Text + "' and  '" + EndTime.Text + "' order by F_TIME";

        DataSet data = opt.CreateDataSetOra(query);

        GridView1.DataSource = data;
        GridView1.DataBind();
    }
Exemple #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         MSYS.Data.SysUser   user = (MSYS.Data.SysUser)Session["User"];
         MSYS.DAL.DbOperator opt  = new MSYS.DAL.DbOperator();
         //opt.bindDropDownList(tag, "select DISTINCT ALM_TAGNAME from fixalarms", "ALM_TAGNAME", "ALM_TAGNAME");
         opt.bindDropDownList(area, "select DISTINCT ALM_ALMAREA from fixalarms order by ALM_ALMAREA", "ALM_ALMAREA", "ALM_ALMAREA");
     }
 }
Exemple #10
0
    protected void btnDel2_Click(object sender, EventArgs e)
    {
        string query = "update  HT_PUB_MATERIEL set IS_DEL = '1' where  MATERIAL_CODE = '" + txtCode2.Text + "'";

        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
        string log_message      = opt.UpDateOra(query) == "Success" ? "物料删除成功" : "物料删除失败";

        log_message += ",物料编码:" + txtCode2.Text;
        InsertTlog(log_message);
    }
Exemple #11
0
    protected DataRow  getTableData(string tableId)
    {
        string query = "SELECT * FROM HT_QLT_INSPECT_FACTORY WHERE id = '" + tableId + "'";

        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
        System.Diagnostics.Debug.WriteLine(query);
        DataSet tableData = opt.CreateDataSetOra(query);

        return(tableData.Tables[0].Rows[0]);
    }
Exemple #12
0
    protected void listGridarea_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList list     = (DropDownList)sender;
        GridViewRow  row      = (GridViewRow)list.NamingContainer;
        int          rowindex = row.RowIndex;
        DropDownList list1    = (DropDownList)row.FindControl("listGridEq");

        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
        opt.bindDropDownList(list1, "select distinct t.IDKEY,t.EQ_NAME  from ht_eq_eqp_tbl t  where t.is_del = '0' and t.is_valid = '1'   and t.section_code = '" + list.SelectedValue + "'  order by t.idkey", "EQ_NAME", "IDKEY");
    }
Exemple #13
0
    protected void bindGrid1()
    {
        string query = "select t.mt_name as 润滑计划,t1.f_name as 部门,t2.name as 审批状态,t3.name as 执行状态,t.remark as 备注,t.pz_code,t.task_status  from ht_eq_lb_plan t left join ht_svr_org_group t1 on t1.f_code = t.create_dept_id   left join ht_inner_aprv_status t2 on t2.id = t.flow_status left join ht_inner_eqexe_status t3 on t3.id = t.task_status   where t.expired_date between '" + txtStart.Text + "' and '" + txtStop.Text + "'  and t.IS_DEL = '0' and t.FLOW_STATUS = '2'  and t.task_status  = '5' ";

        MSYS.DAL.DbOperator opt  = new MSYS.DAL.DbOperator();
        DataSet             data = opt.CreateDataSetOra(query);

        GridView1.DataSource = data;
        GridView1.DataBind();
    }//绑定gridview1数据源
Exemple #14
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        SetBlank();
        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
        string id = (Convert.ToInt16(opt.GetSegValue("select  nvl(max(substr(F_CODE,4,3)),0) as F_CODE from HT_SVR_ORG_GROUP ", "F_CODE")) + 1).ToString().PadLeft(3, '0');

        txtCode.Text             = "007" + id + "00";
        listParent.SelectedValue = "00700000";
        ScriptManager.RegisterStartupScript(updtpanel1, this.Page.GetType(), "", " $('.shade').fadeIn(200);", true);
    }
Exemple #15
0
    protected void UpdateGrid_Click(object sender, EventArgs e)
    {
        string query = "select g1.PARA_CODE as 参数编码,g1.lower as 下限,g1.upper as 上限,g1.QLT_TYPE as 考核类型,g1.MINUS_SCORE as 超限扣分,g1.REMARK as 备注 from ht_QLT_stdd_code_detail g1 left join ht_pub_tech_para g3 on g3.para_code = g1.para_code  left join ht_pub_tech_section g2 on substr(g1.para_code ,1,5) = g2.section_code where g1.is_del = '0'  and g1.qlt_code = '" + txtCode.Text + "' and g2.section_code = '" + hideprc.Value + "' and g3.para_type like '______1%' and g3.is_del = '0'";

        MSYS.DAL.DbOperator opt  = new MSYS.DAL.DbOperator();
        DataSet             set  = opt.CreateDataSetOra(query);
        DataTable           data = set.Tables[0];

        bindgrid(data, hideprc.Value);
    }
Exemple #16
0
    protected void bindGrid2()
    {
        string query = " select SHIFT_CODE  as 班时编码,SHIFT_NAME  as 班时名称,WORKSHOP_ID  as 所属车间ID,BEGIN_TIME  as 班时开始时间,END_TIME  as 班时结束时间,INTER_DAY as 是否跨天,CREATE_TIME  as 创建时间,MODIFY_TIME  as 修改时间 from ht_sys_shift where is_del = '0' and is_valid = '1' order by SHIFT_CODE";

        MSYS.DAL.DbOperator opt  = new MSYS.DAL.DbOperator();
        DataSet             data = opt.CreateDataSetOra(query);

        GridView2.DataSource = data;
        GridView2.DataBind();
    }
Exemple #17
0
    protected void bindGrid1()
    {
        string query = "select TEAM_CODE  as 班组编码,TEAM_NAME  as 班组名称,WORKSHOP_ID  as 车间ID,CREATE_TIME  as 创建时间,MODIFY_TIME  as 修改时间 from ht_sys_team where is_del = '0' and is_valid = '1' order by TEAM_CODE";

        MSYS.DAL.DbOperator opt  = new MSYS.DAL.DbOperator();
        DataSet             data = opt.CreateDataSetOra(query);

        GridView1.DataSource = data;
        GridView1.DataBind();
    }
Exemple #18
0
    protected void listGridsct_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList list     = (DropDownList)sender;
        GridViewRow  row      = (GridViewRow)list.NamingContainer;
        int          rowindex = row.RowIndex;
        DropDownList list1    = (DropDownList)row.FindControl("listGridEq");

        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
        opt.bindDropDownList(list1, "select IDKEY,EQ_NAME  from ht_eq_eqp_tbl where section_code = '" + list.SelectedValue + "'  order by idkey", "EQ_NAME", "IDKEY");
    }
Exemple #19
0
    protected void btnModify_Click(object sender, EventArgs e)
    {
        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
        if (txtCode.Text.Length == 10 && txtCode.Text.Substring(0, 5) == listSection.SelectedValue)
        {
            string   oldepath = opt.GetSegValue("select * from HT_PUB_TECH_PARA where PARA_CODE = '" + txtCode.Text + "'", "PATH_NODE");
            string[] seg      = { "PARA_CODE", "PARA_NAME", "PARA_UNIT", "PARA_TYPE", "REMARK", "IS_VALID", "CREATE_ID", "CREATE_TIME", "EQUIP_CODE", "SET_TAG", "VALUE_TAG", "BUSS_ID", "PATH_NODE" };
            string[] value    = { txtCode.Text, txtName.Text, txtUnit.Text, getType(), txtDscrp.Text, Convert.ToInt16(rdValid.Checked).ToString(), ((MSYS.Data.SysUser)Session["User"]).id, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), listEquip.SelectedValue, txtSetTag.Text, txtValueTag.Text, listApt.SelectedValue, listPathnode.SelectedValue };

            string log_message;
            if (opt.MergeInto(seg, value, 1, "HT_PUB_TECH_PARA") == "Success")
            {
                log_message = "保存参数点成功";
                tvHtml      = InitTree();
                string[] procseg    = { };
                object[] procvalues = { };
                opt.ExecProcedures("Create_Online_month_Report", procseg, procvalues);
                if (ckQuaAnalyze.Checked && oldepath != listPathnode.SelectedValue)
                {
                    DataSet points = opt.CreateDataSetOra("select distinct path_code,path_name from ht_pub_para_weight t ");
                    if (points != null && points.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow row in points.Tables[0].Rows)
                        {
                            if (listPathnode.SelectedValue == "")
                            {
                                opt.UpDateOra("insert into ht_pub_para_weight(para_code,path_code,weight,path_name)values ('" + txtCode.Text + "','" + row["path_code"].ToString() + "','0.2','" + row["path_name"].ToString() + "')");
                            }
                            else
                            {
                                DataSet paras = opt.CreateDataSetOra("select  r.para_code,t.pathcode from ht_pub_path_prod t  left join ht_pub_path_node s on s.is_del = '0' and  s.section_code = t.section_code and substr(t.section_path,s.orders,1) = '0' left join ht_pub_tech_para r on r.path_node = s.id and r.is_del = '0' and r.para_type like '______1%' where t.pathcode = '" + row["path_code"].ToString() + "' and t.is_del = '0' and r.para_code = '" + txtCode.Text + "'");
                                if (paras != null && paras.Tables[0].Rows.Count > 0)
                                {
                                    opt.UpDateOra("delete from ht_pub_para_weight where para_code = '" + txtCode.Text + "' and path_code = '" + row["path_code"].ToString() + "'");
                                }
                            }
                        }
                    }
                }
                // opt.UpDateOra("delete from ht_pub_para_weight where PATH_CODE = '" + listPathAll.SelectedValue + "'");
                // opt.UpDateOra("insert into ht_pub_para_weight ( select  r.para_code,t.pathcode,'0',0.2,'test1' from ht_pub_path_prod t  left join ht_pub_path_node s on s.is_del = '0' and  s.section_code = t.section_code and substr(t.section_path,s.orders,1) = '1' left join ht_pub_tech_para r on r.path_node = s.id and r.is_del = '0' and r.para_type like '______1%' where t.pathcode = '" + listPathAll.SelectedValue + "' and t.is_del = '0' and r.para_code is not null union select r.para_code,'" + listPathAll.SelectedValue + "','0',0.2,'test1' from ht_pub_tech_para r where r.para_type like '______1%' and r.path_node is null and r.is_del = '0')");
            }
            else
            {
                log_message = "保存参数点失败";
            }
            log_message += "--数据详情:" + string.Join(",", value);
            ScriptManager.RegisterStartupScript(UpdatePanel4, this.Page.GetType(), "sucess", "initTree();alert('" + log_message + "');", true);
            InsertTlog(log_message);
        }
        else
        {
            ScriptManager.RegisterStartupScript(UpdatePanel4, this.Page.GetType(), "message", "alert('请确认工艺参数所属工艺段是否正确')", true);
        }
    }
Exemple #20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.PageLoad(sender, e);
     if (!IsPostBack)
     {
         MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
         opt.bindDropDownList(listSection, "select section_code,section_name  from ht_pub_tech_section where is_del = '0' and is_valid = '1' order by section_code ", "section_name", "section_code");
         opt.bindDropDownList(listEq, "select IDKEY,EQ_NAME from ht_eq_eqp_tbl where is_del = '0' and is_valid = '1'", "EQ_NAME", "IDKEY");
         bindGrid();
     }
 }
Exemple #21
0
    protected void btnGridIssue_Click(object sender, EventArgs e)//查看审批流程
    {
        Button btn      = (Button)sender;
        int    rowIndex = ((GridViewRow)btn.NamingContainer).RowIndex;
        string ID       = GridView1.DataKeys[rowIndex].Value.ToString();
        string query    = "select pos as 顺序号, workitemid as 审批环节,username as 负责人,comments as 意见,opiniontime 审批时间,(case status when '0' then '未审批'  when '1' then '未通过' else '己通过' end)  as 审批状态  from ht_pub_aprv_opinion r left join ht_pub_aprv_flowinfo s on r.gongwen_id = s.id where s.busin_id  = '" + ID + "' order by pos";

        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
        GridView3.DataSource = opt.CreateDataSetOra(query);
        GridView3.DataBind();
    }
Exemple #22
0
 protected void btnGridNew_Click(object sender, EventArgs e)
 {
     setBlank();
     SetEnable("未提交");
     MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
     txtCode.Text = "RP" + System.DateTime.Now.ToString("yyyyMMdd") + (Convert.ToInt16(opt.GetSegValue("select nvl( max(substr(pz_code,11,3)),0) as ordernum from HT_EQ_RP_PLAN where substr(pz_code,1,10) ='RP" + System.DateTime.Now.ToString("yyyyMMdd") + "'", "ordernum")) + 1).ToString().PadLeft(3, '0');
     MSYS.Data.SysUser user = (MSYS.Data.SysUser)Session["User"];
     listEditor.SelectedValue = user.id;
     listApt.SelectedValue    = user.OwningBusinessUnitId;
     bindGrid2("");
 }
Exemple #23
0
 protected void initView()
 {
     MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
     txtRecordtime.Text = System.DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd");
     txtEndtime.Text    = System.DateTime.Now.ToString("yyyy-MM-dd");
     opt.bindDropDownList(listProd, "select prod_code,prod_name from ht_pub_prod_design where is_del = '0' and is_valid = '1' order by prod_code", "prod_name", "prod_code");
     opt.bindDropDownList(listProd2, "select prod_code,prod_name from ht_pub_prod_design where is_del = '0' and is_valid = '1' order by prod_code", "prod_name", "prod_code");
     opt.bindDropDownList(listTeam, "select team_code,team_name from ht_sys_team where is_del = '0' and is_valid = '1' order by team_code", "team_name", "team_code");
     opt.bindDropDownList(listTeam2, "select team_code,team_name from ht_sys_team where is_del = '0' and is_valid = '1' order by team_code", "team_name", "team_code");
     bindGrid();
 }
Exemple #24
0
    protected void listGridType_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList list = (DropDownList)sender;
        GridViewRow  row  = (GridViewRow)list.NamingContainer;

        if (list.SelectedValue != "")
        {
            MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
            opt.bindDropDownList((DropDownList)row.FindControl("listGridName"), "select material_code,material_name from ht_pub_materiel  where  is_del = '0' and mat_category = '原材料'   and (substr(type_code,1,4) ='" + list.SelectedValue + "' or substr(material_code,1,4) = '" + list.SelectedValue + "')", "material_name", "material_code");
        }
    }
Exemple #25
0
 protected void btnGridNew_Click(object sender, EventArgs e)// 新增领退明细
 {
     setBlank();
     MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
     txtCode.Text = "SF" + System.DateTime.Now.ToString("yyyyMMdd") + (Convert.ToInt16(opt.GetSegValue("select  nvl(max(substr(ORDER_SN,11,3)),0)  as ordernum from HT_STRG_FLAVOR where substr(ORDER_SN,1,10) ='SF" + System.DateTime.Now.ToString("yyyyMMdd") + "'", "ordernum")) + 1).ToString().PadLeft(3, '0');
     MSYS.Data.SysUser user = (MSYS.Data.SysUser)Session["User"];
     listCreator.SelectedValue = user.id;
     listApt.SelectedValue     = user.OwningBusinessUnitId;
     bindGrid2();
     SetEnable(true);
 }
Exemple #26
0
    protected void btnDel_Click(object sender, EventArgs e)
    {
        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
        string query            = "delete from HT_SVR_PRT_MENU where NAME = '" + txtMenu.Text + "'";
        string log_message      = opt.UpDateOra(query) == "Success" ? "删除父级菜单成功" : "删除父级菜单失败";

        log_message += "--标识:" + txtMenu.Text;
        InsertTlog(log_message);
        BindList(RightTree.Nodes, "");
        SetBlank();
    }
Exemple #27
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.PageLoad(sender, e);
     if (!IsPostBack)
     {
         bindData();
         BindList(RightTree.Nodes, "");
         MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
         opt.bindDropDownList(listPrt, "select * from ht_svr_prt_menu where IS_DEL = '0' order by ID", "NAME", "ID");
     }
 }
Exemple #28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.PageLoad(sender, e);
     if (!IsPostBack)
     {
         txtEtime.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
         txtBtime.Text = System.DateTime.Now.ToString("yyyy-MM") + "-01";
         MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();
         opt.bindDropDownList(listRecipe, "select Prod_code,Prod_name from ht_pub_prod_design  where is_del = '0' and B_FLOW_STATUS = '2'", "PROD_NAME", "PROD_CODE");
     }
 }
Exemple #29
0
    protected void btnGridview_Click(object sender, EventArgs e)//查看领退明细
    {
        Button btn      = (Button)sender;
        int    rowIndex = ((GridViewRow)btn.NamingContainer).RowIndex;

        txtCode.Text = GridView1.DataKeys[rowIndex].Value.ToString();

        MSYS.DAL.DbOperator opt  = new MSYS.DAL.DbOperator();
        DataSet             data = opt.CreateDataSetOra("select * from HT_STRG_FLAVOR  where ORDER_SN =  '" + txtCode.Text + "'");

        if (data != null && data.Tables[0].Rows.Count > 0)
        {
            txtPrdctdate.Text         = data.Tables[0].Rows[0]["OUT_DATE"].ToString();
            listStatus.SelectedValue  = data.Tables[0].Rows[0]["AUDIT_MARK"].ToString();
            listStorage.SelectedValue = data.Tables[0].Rows[0]["WARE_HOUSE_ID"].ToString();
            listApt.SelectedValue     = data.Tables[0].Rows[0]["DEPT_ID"].ToString();
            if (listStrgOut.Items.FindByValue(data.Tables[0].Rows[0]["Relation_code"].ToString()) != null)
            {
                listStrgOut.SelectedValue = data.Tables[0].Rows[0]["Relation_code"].ToString();
                txtStrgOut.Visible        = false;
                listStrgOut.Visible       = true;
            }
            else
            {
                listStrgOut.SelectedValue = "";
                txtStrgOut.Text           = data.Tables[0].Rows[0]["Relation_code"].ToString();
                txtStrgOut.Visible        = true;
                listStrgOut.Visible       = false;
            }
            txtValiddate.Text = data.Tables[0].Rows[0]["EXPIRED_DATE"].ToString();
            txtPlanno.Text    = data.Tables[0].Rows[0]["MONTHPLANNO"].ToString();
            string temp = opt.GetSegValue("select Prod_code from ht_prod_month_plan_detail where plan_no = '" + data.Tables[0].Rows[0]["MONTHPLANNO"].ToString() + "'", "PROD_CODE");
            if (listPrdct.Items.FindByValue(temp) != null)
            {
                listPrdct.SelectedValue = temp;
            }
            else
            {
                listPrdct.SelectedValue = "";
            }

            txtStemSum.Text           = data.Tables[0].Rows[0]["CABOSUM"].ToString();
            listCreator.SelectedValue = data.Tables[0].Rows[0]["CREATOR_ID"].ToString();
        }
        if (listStatus.SelectedItem.Text == "未提交")
        {
            SetEnable(true);
        }
        else
        {
            SetEnable(false);
        }
        bindGrid2();
    }
Exemple #30
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        MSYS.DAL.DbOperator opt = new MSYS.DAL.DbOperator();

        foreach (GridViewRow row in GridView3.Rows)
        {
            string[] seg   = { "ID", "FIRST", "SECOND", "THIRD" };
            string[] value = { ((TextBox)row.FindControl("txtOrder")).Text, ((DropDownList)row.FindControl("listTeam1")).Text, ((DropDownList)row.FindControl("listTeam2")).Text, ((DropDownList)row.FindControl("listTeam3")).Text };
            opt.MergeInto(seg, value, 1, "ht_inner_team_schedule");
        }
    }