コード例 #1
0
        protected void bindGrid()
        {
            try
            {
                DataTable dt     = new DataTable();
                string    sqlCmd = "select * from OA_DocMgmt_DocType where pid='0' and  stat=1 order by type_name";
                SqlSel.GetSqlSel(ref dt, sqlCmd);
                Grid1.DataSource = dt;
                Grid1.DataBind();

                sqlCmd = "select max(id) from OA_DocMgmt_DocType";
                string curMaxId = SqlSel.GetSqlScale(sqlCmd).ToString();
                if (string.IsNullOrEmpty(curMaxId))
                {
                    label_hidden.Text = "0";
                }
                else
                {
                    label_hidden.Text = curMaxId;
                }
            }
            catch (Exception ex)
            {
                Alert.ShowInTop(ex.Message);
                return;
            }
        }
コード例 #2
0
ファイル: UserMgmt_edit.aspx.cs プロジェクト: yykxia/OA
        //显示人员信息
        private void loadInfo()
        {
            string    sqlCmd = "select * from OA_Sys_EmployeeInfo where id='" + recvId + "' order by loginId";
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            txb_loginID.Text     = dt.Rows[0]["loginId"].ToString();
            txb_chineseName.Text = dt.Rows[0]["chineseName"].ToString();
            numbb_phoneNumb.Text = dt.Rows[0]["phoneNumber"].ToString();
            int useStatus = Convert.ToInt32(dt.Rows[0]["useStatus"]);

            //是否在用
            if (useStatus == 0)
            {
                ckeckBox_enabled.Checked = false;
            }
            else
            {
                ckeckBox_enabled.Checked = true;
            }
            //加载部门信息
            ddl_depart.SelectedValue = dt.Rows[0]["deptId"].ToString();
            //加载岗位信息
            ddl_duty.SelectedValue = dt.Rows[0]["dutyId"].ToString();
            //加载角色信息
            checkBoxListBind(recvId);
        }
コード例 #3
0
ファイル: docMgmt_PropetyEdit.aspx.cs プロジェクト: yykxia/OA
        private void loadInfo()
        {
            string    sqlCmd = "select * from [OA_DocMgmt_Propety] where docId='" + recvId + "'";
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            if (dt.Rows.Count > 0)
            {
                UpdateAction   = "1";//按钮动作为:更新
                txb_docSN.Text = dt.Rows[0]["docSN"].ToString();
                ddl_sourceDoc.SelectedValue = dt.Rows[0]["SourceDocId"].ToString();
                txa_AgreementPaty.Text      = dt.Rows[0]["AgreementPaty"].ToString();
                txa_SubjectMatter.Text      = dt.Rows[0]["SubjectMatter"].ToString();
                numb_amount.Text            = dt.Rows[0]["AgreeAmount"].ToString();
                txb_AmountType.Text         = dt.Rows[0]["AmountType"].ToString();
                if (!string.IsNullOrEmpty(dt.Rows[0]["StartDate"].ToString()))
                {
                    DatePicker1.SelectedDate = Convert.ToDateTime(dt.Rows[0]["StartDate"]);
                }
                if (!string.IsNullOrEmpty(dt.Rows[0]["EndDate"].ToString()))
                {
                    DatePicker2.SelectedDate = Convert.ToDateTime(dt.Rows[0]["EndDate"]);
                }
                txa_Remarks.Text = dt.Rows[0]["Remarks"].ToString();
            }
            else
            {
                UpdateAction = "0";//按钮动作为:保存
            }
        }
コード例 #4
0
        private void loadInfo(string tabId)
        {
            string sqlCmd = "select A.*,c.chineseName,d.deptName,t.flowName,f.projName,";

            sqlCmd += "(case when deptCarId is null then A.carNumb else tt.propertyName end) as carName from OA_Car_Main A";
            sqlCmd += " left join OA_Sys_EmployeeInfo c on c.id=a.reqMan left join OA_sys_department d on d.id=c.deptId left join OA_sys_Project f on f.id=a.projId";
            sqlCmd += " left join OA_sys_flow t on t.id=A.flowId left join OA_Property_Register tt on tt.id=A.deptCarId where A.id='" + tabId + "'";
            DataTable dt = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);

            label_name.Text           = dt.Rows[0]["chineseName"].ToString() + "/" + dt.Rows[0]["deptName"].ToString();
            label_date.Text           = Convert.ToDateTime(dt.Rows[0]["reqDte"]).ToShortDateString();
            label_carName.Text        = dt.Rows[0]["carName"].ToString();
            rdbl_status.SelectedValue = dt.Rows[0]["adminRegister"].ToString();
            if (dt.Rows[0]["adminRegister"].ToString() == "1")
            {
                rdbl_status.Items.RemoveAt(2);//已发车申请不可取消
            }
            if (!string.IsNullOrEmpty(dt.Rows[0]["actualUseTime"].ToString()))
            {
                DatePicker1.SelectedDate = Convert.ToDateTime(dt.Rows[0]["actualUseTime"]);
                TimePicker1.Text         = Convert.ToDateTime(dt.Rows[0]["actualUseTime"]).ToShortTimeString();
            }
            if (!string.IsNullOrEmpty(dt.Rows[0]["actualBackTime"].ToString()))
            {
                DatePicker2.SelectedDate = Convert.ToDateTime(dt.Rows[0]["actualBackTime"]);
                TimePicker2.Text         = Convert.ToDateTime(dt.Rows[0]["actualBackTime"]).ToShortTimeString();
            }

            numbbox_actualMileage.Text = dt.Rows[0]["actualMileage"].ToString();
            numbbox_endMileage.Text    = dt.Rows[0]["endMileage"].ToString();
            label_toWhere.Text         = dt.Rows[0]["toWhere"].ToString();
            label_reason.Text          = dt.Rows[0]["useReason"].ToString();
        }
コード例 #5
0
        private void bindHidden(string formId, string tabName)
        {
            StringBuilder sb     = new StringBuilder();
            string        sqlCmd = "select * from OA_Sys_files where formID='" + formId + "' and formDataName='" + tabName + "'";
            DataTable     dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            Grid2.DataSource = dt;
            Grid2.DataBind();
            //if (dt.Rows.Count == 0)
            //{
            //    btn_review.Enabled = false;
            //}
            //else
            //{
            //    for (int i = 0; i < dt.Rows.Count; i++)
            //    {
            //        sb.AppendFormat("{0};", dt.Rows[i]["fileName"].ToString());
            //    }
            //    if (!string.IsNullOrEmpty(sb.ToString()))
            //    {
            //        hidden_field.Value = sb.ToString().Substring(0, sb.ToString().Length - 1);
            //    }
            //}
        }
コード例 #6
0
ファイル: PLM_BarCode_Release.aspx.cs プロジェクト: yykxia/OA
 protected void rbt_query_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         string sqlCmd = "select a.tradeNo,isnull(a.bindSum,0) as bindSum,b.orderno,b.plancount,b.itemNo,b.itemParm,(case when onlineStatus='1' then '在产' else '完工' end) as status,b.endTime,isnull(c.bindTotal,0) as bindTotal,isnull(d.offlinecount,0) as offlinecount from ";
         sqlCmd += "(select sum(bindQty) as bindSum,tradeno from PLM_Serials_BindBarCode where olineStatus='1' group by tradeNo) a ";
         sqlCmd += "left join PLM_Product_OnLine b on a.tradeno=b.id";
         sqlCmd += " left join (select sum(bindQty) as bindTotal,tradeno from PLM_Serials_BindBarCode group by tradeNo) c on c.tradeno=a.tradeNo";
         sqlCmd += " left join (select sum(bindQty) as offLineCount,tradeno from PLM_Serials_BindBarCode where olineStatus='0' group by tradeNo) d on d.tradeno=a.tradeNo";
         string   selectedValue = rbt_query.SelectedValue;
         DateTime curDte        = DateTime.Now;
         if (selectedValue == "3")//三天前
         {
             sqlCmd += " where endTime<='" + curDte.AddDays(-3) + "' order by endTime";
         }
         if (selectedValue == "2")
         {
             sqlCmd += " where endTime<='" + curDte.AddDays(-2) + "' order by endTime";
         }
         if (selectedValue == "1")
         {
             sqlCmd += " where endTime<='" + curDte.AddDays(-1) + "' order by endTime";
         }
         DataTable dt = new DataTable();
         SqlSel.GetSqlSel(ref dt, sqlCmd);
         Grid1.DataSource = dt;
         Grid1.DataBind();
     }
     catch (Exception ex)
     {
         Alert.Show(ex.Message);
     }
 }
コード例 #7
0
 protected void btnSaveRefresh_Click(object sender, EventArgs e)
 {
     try
     {
         if (filePhoto.HasFile)
         {
             string sqlCmd = "";
             sqlCmd = "select * from PLM_Product_OnLine where OrderId='" + Label_sn.Text + "'";
             DataTable tmpDt = new DataTable();
             SqlSel.GetSqlSel(ref tmpDt, sqlCmd);
             if (tmpDt.Rows.Count > 0)//如果当前产品已经排产过则提示是否继续操作
             {
                 string scriptString = Confirm.GetShowReference("当前产品已经下达过计划,是否继续安排生产计划?", string.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference("Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"));
                 PageContext.RegisterStartupScript(scriptString);
             }
             else
             {
                 infoInsert();
             }
         }
         else
         {
             Alert.ShowInTop("请上传相应的产品图片!");
             return;
         }
     }
     catch (Exception ex)
     {
         Alert.ShowInTop(ex.Message);
         return;
     }
 }
コード例 #8
0
        protected void btn_union_Click(object sender, EventArgs e)
        {
            try
            {
                DataTable dt     = new DataTable();
                string    dt1    = DatePicker1.Text;
                string    dt2    = DatePicker2.Text;
                string    sqlStr = "select * from ";
                sqlStr += "(select a.tradeno_orig,a.nickname_orig,a.moneyfrom_orig,a.paySum_orig,a.orderStatus_orig,a.customerDesc_orig,a.saleDesc_orig, ";
                sqlStr += "a.orderStartTime_orig,a.goodsName_orig,a.goodsCount_orig,a.tradeDesc_orig,b.custNickName, ";
                sqlStr += "b.tradeNo,b.cashGo,b.goodsCount,b.goodsName,b.payCount,b.payDate,(select tradename from t_trade_tradetype where paytype=t_trade_tradetype.id)as payType, ";
                sqlStr += "b.addDesc,b.customerName from t_trade_specreg b ";
                sqlStr += "left join t_trade_orderreg_orig a on tradeno=tradeno_orig ";
                sqlStr += "where shopid_orig='" + ddl_shopList.SelectedValue + "' and paydate>='" + dt1 + "' and paydate<='" + dt2 + "') aa ";
                sqlStr += "left join ";
                sqlStr += "(select tradeno2,tradestatusext,remark,tradeid,goodslist,(convert(float,rcvtotal)) as rcvtotal from v_TradeList t ";
                sqlStr += "where shopid='" + ddl_shopList.SelectedValue + "' and tradestatus>0 and tradeno2 <> '' ";
                sqlStr += "and t.tradeid=(select min(tradeid) from v_tradelist where tradeno2=t.tradeno2) ";
                sqlStr += ") bb on bb.tradeno2=aa.tradeno_orig order by paydate";

                SqlSel.GetSqlSel(ref dt, sqlStr);
                Grid1.DataSource = dt;
                Grid1.DataBind();
            }
            catch (Exception ex)
            {
                Alert.Show(ex.ToString());
                return;
            }
        }
コード例 #9
0
        private void bindGrid(string orderNo, string itemNo)
        {
            string sqlCmd = "select (case IsTemp when '1' then '插单' else '' end) as tempDesc,* from PLM_Product_OnLine a left join ";

            sqlCmd += "(select sum(bindQty) as onlineSum,tradeno from PLM_Serials_BindBarCode group by tradeno) c on c.tradeno=a.id ";
            sqlCmd += "where id not in (select OnlineId from PLM_Product_OffLine) and onlineStatus=0";
            DataTable dt = new DataTable();

            if (!string.IsNullOrEmpty(orderNo))
            {
                sqlCmd += " and orderNo like '%" + orderNo + "'%";
            }
            if (!string.IsNullOrEmpty(itemNo))
            {
                sqlCmd += " and itemNo like '%" + itemNo + "'%";
            }
            SqlSel.GetSqlSel(ref dt, sqlCmd);
            if (dt.Rows.Count > 0)
            {
                Grid1.DataSource = dt;
                Grid1.DataBind();
            }
            else
            {
                Alert.ShowInTop("无数据显示!");
                return;
            }
        }
コード例 #10
0
ファイル: PayItemMgmt.aspx.cs プロジェクト: yykxia/OA
        protected void bindGrid()
        {
            try
            {
                DataTable dt     = new DataTable();
                string    sqlCmd = "select * from OA_Bills_costLists where [bStatus]='1' order by id";
                SqlSel.GetSqlSel(ref dt, sqlCmd);
                Grid1.DataSource = dt;
                Grid1.DataBind();

                sqlCmd = "select max(id) from OA_Bills_costLists";
                string curMaxId = SqlSel.GetSqlScale(sqlCmd).ToString();
                if (string.IsNullOrEmpty(curMaxId))
                {
                    label_hidden.Text = "0";
                }
                else
                {
                    label_hidden.Text = curMaxId;
                }
            }
            catch (Exception ex)
            {
                Alert.ShowInTop(ex.Message);
                return;
            }
        }
コード例 #11
0
ファイル: wdgjWebService.asmx.cs プロジェクト: yykxia/esAPI
        public DataSet wdgj_AddressMap()
        {
            DataSet ds = new DataSet();
            //省
            string    sqlCmd = "select * from G_Cfg_SndMap_Province";
            DataTable ProvDt = new DataTable();

            SqlSel.GetSqlSel(ref ProvDt, sqlCmd);
            ProvDt.TableName = "Province";
            //市
            sqlCmd = "select * from G_Cfg_SndMap_City";
            DataTable CityDt = new DataTable();

            SqlSel.GetSqlSel(ref CityDt, sqlCmd);
            CityDt.TableName = "City";
            //区
            sqlCmd = "select * from G_Cfg_SndMap_Area";
            DataTable AreaDt = new DataTable();

            SqlSel.GetSqlSel(ref AreaDt, sqlCmd);
            AreaDt.TableName = "Area";

            ds.Tables.Add(ProvDt);
            ds.Tables.Add(CityDt);
            ds.Tables.Add(AreaDt);

            ds.DataSetName = "AddressMap";
            return(ds);
        }
コード例 #12
0
        private void bindGrid(string userId)
        {
            //string userName = GetUser();
            //string userName = "******";
            //string sqlCmd = "select top 1 id from OA_Sys_EmployeeInfo where loginId='" + userName + "'";
            //string userId = SqlSel.GetSqlScale(sqlCmd).ToString();
            string sqlCmd = "select (select chineseName from OA_Sys_EmployeeInfo where id=userId) as chineseName,* from OA_Sys_step_empList";

            sqlCmd += " where userId='" + userId + "' and id not in (select nodeId from OA_Sys_NodeDetail)";
            DataTable dt = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            dt.Columns.Add("reqMan");
            dt.Columns.Add("reqDte", typeof(DateTime));
            dt.Columns.Add("flowName");
            foreach (DataRow dr in dt.Rows)
            {
                string formName = dr["formDataName"].ToString();
                string formId   = dr["formId"].ToString();
                sqlCmd = "select a.*,b.chineseName,c.flowName from " + formName + " a left join OA_Sys_EmployeeInfo b  on a.reqMan = b.id left join OA_sys_flow c on a.flowId=c.id where a.id='" + dr["formId"] + "'";
                DataTable temDt = new DataTable();
                SqlSel.GetSqlSel(ref temDt, sqlCmd);
                dr["reqMan"]   = temDt.Rows[0]["chineseName"];
                dr["reqDte"]   = temDt.Rows[0]["reqDte"];
                dr["flowName"] = dr["formName"].ToString() + "(" + temDt.Rows[0]["flowName"] + ")";
            }
            dt.DefaultView.Sort = "reqDte DESC";
            Grid1.DataSource    = dt;
            Grid1.DataBind();
        }
コード例 #13
0
        private void LoadInfo(string tabId)
        {
            string sqlCmd = "select A.*,c.chineseName,d.deptName,t.flowName from OA_Leave_Main A";

            sqlCmd += " left join OA_Sys_EmployeeInfo c on c.id=a.reqMan left join OA_sys_department d on d.id=c.deptId";
            sqlCmd += " left join OA_sys_flow t on t.id=A.flowId where A.id='" + tabId + "'";
            DataTable dt = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            if (dt.Rows.Count > 0)
            {
                label_name.Text     = dt.Rows[0]["chineseName"].ToString() + '/' + dt.Rows[0]["deptName"].ToString();
                label_date.Text     = Convert.ToDateTime(dt.Rows[0]["reqDte"]).ToShortDateString();
                label_flowName.Text = dt.Rows[0]["flowName"].ToString();
                label_strTime.Text  = dt.Rows[0]["strTime"].ToString();
                label_endTime.Text  = dt.Rows[0]["endTime"].ToString();
                label_days.Text     = dt.Rows[0]["lastDays"].ToString();
                label_hours.Text    = dt.Rows[0]["lastHours"].ToString();
                label_reason.Text   = dt.Rows[0]["leaveReason"].ToString();
                label_replacer.Text = dt.Rows[0]["workReplacer"].ToString();
            }


            //加载附件信息
            bindHidden(label_tabId.Text, "OA_Leave_Main");
            //审批信息
            bindCheckDetail(label_tabId.Text, "OA_Leave_Main");
        }
コード例 #14
0
        //加载项目中同类型文档作为来源文档
        //private void ddlBind()
        //{
        //    string sqlCmd = "select A.*,B.docSN from OA_DocMgmt_DocList A left join OA_DocMgmt_Propety B ON A.ID=b.docId where docTyp=(select docTyp from OA_DocMgmt_DocList where id='" + recvId + "') ";
        //    sqlCmd += "and doc_leng=(select doc_leng from OA_DocMgmt_DocList where id='" + recvId + "') and id <> '" + recvId + "'";
        //    DataTable dt = new DataTable();
        //    SqlSel.GetSqlSel(ref dt, sqlCmd);
        //    ddl_sourceDoc.DataTextField = "docName";
        //    ddl_sourceDoc.DataValueField = "id";
        //    ddl_sourceDoc.DataSource = dt;
        //    ddl_sourceDoc.DataBind();
        //}


        private void loadInfo()
        {
            string    sqlCmd = "select *,(select docSN from OA_DocMgmt_Propety A where A.docId=B.SourceDocId) as sourceDoc from [OA_DocMgmt_Propety] B where docId='" + recvId + "'";
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            if (dt.Rows.Count > 0)
            {
                txb_docSN.Text         = dt.Rows[0]["docSN"].ToString();
                label_sourceDoc.Text   = dt.Rows[0]["sourceDoc"].ToString();
                txa_AgreementPaty.Text = dt.Rows[0]["AgreementPaty"].ToString();
                txa_SubjectMatter.Text = dt.Rows[0]["SubjectMatter"].ToString();
                numb_amount.Text       = dt.Rows[0]["AgreeAmount"].ToString();
                txb_AmountType.Text    = dt.Rows[0]["AmountType"].ToString();
                if (!string.IsNullOrEmpty(dt.Rows[0]["StartDate"].ToString()))
                {
                    DatePicker1.SelectedDate = Convert.ToDateTime(dt.Rows[0]["StartDate"]);
                }
                if (!string.IsNullOrEmpty(dt.Rows[0]["EndDate"].ToString()))
                {
                    DatePicker2.SelectedDate = Convert.ToDateTime(dt.Rows[0]["EndDate"]);
                }
                txa_Remarks.Text = dt.Rows[0]["Remarks"].ToString();
            }
        }
コード例 #15
0
 protected void btn_refresh_Click(object sender, EventArgs e)
 {
     try
     {
         if (!string.IsNullOrEmpty(DatePicker1.Text) & !string.IsNullOrEmpty(DatePicker2.Text))
         {
             string sqlCmd = "select (case IsTemp when '1' then '插单' else '' end) as tempDesc,(case OnlineStatus when '1' then '上线' when '0' then '下线' end) as pStatus,";
             sqlCmd += "(case when ImgURL is not null then '查看' else ImgURL end) as ismlOrno,* from PLM_Product_OnLine a ";
             sqlCmd += "left join PLM_Product_Line b on b.id=a.lineId ";
             sqlCmd += "left join (select sum(bindQty) as onlineSum,tradeno from PLM_Serials_BindBarCode group by tradeno) c on c.tradeno=a.id ";
             sqlCmd += "left join PLM_Product_Image d on a.id=d.OnlineId ";
             sqlCmd += "where onlineStatus like '" + RadioButtonList1.SelectedValue + "' and LineId like '" + ddl_line.SelectedValue + "' ";
             sqlCmd += "and CONVERT(varchar(100), buildtime, 23)>='" + DatePicker1.Text + "' and CONVERT(varchar(100), buildtime, 23)<='" + DatePicker2.Text + "' order by buildtime desc";
             DataTable dt = new DataTable();
             SqlSel.GetSqlSel(ref dt, sqlCmd);
             Grid1.DataSource = dt;
             Grid1.DataBind();
         }
         else
         {
             Alert.ShowInTop("起止日期不可为空!");
             return;
         }
     }
     catch (Exception ex)
     {
         Alert.ShowInTop(ex.Message);
         return;
     }
 }
コード例 #16
0
ファイル: PropertyRegister.aspx.cs プロジェクト: yykxia/OA
        protected void bindGrid()
        {
            try
            {
                DataTable dt     = new DataTable();
                string    sqlCmd = "select * from OA_Property_Register order by BuyDate desc";
                SqlSel.GetSqlSel(ref dt, sqlCmd);
                Grid1.DataSource = dt;
                Grid1.DataBind();

                sqlCmd = "select max(id) from OA_Property_Register";
                string curMaxId = SqlSel.GetSqlScale(sqlCmd).ToString();
                if (string.IsNullOrEmpty(curMaxId))
                {
                    label_hidden.Text = "0";
                }
                else
                {
                    label_hidden.Text = curMaxId;
                }
            }
            catch (Exception ex)
            {
                Alert.ShowInTop(ex.Message);
                return;
            }
        }
コード例 #17
0
ファイル: OverTime_leaderView.aspx.cs プロジェクト: yykxia/OA
        public void loadHeader(string mainId)
        {
            try
            {
                DataTable dt     = new DataTable();
                string    sqlCmd = "select (select name from view_rs_employeeinfo where gh_id=ReqMan) as name,";
                sqlCmd += "(select bm1 from view_rs_employeeinfo where gh_id=ReqMan) as bm1,";
                sqlCmd += "CONVERT(varchar(100), reqDte, 20) as dReqDte,";
                sqlCmd += "CONVERT(varchar(100), ReqDt1, 20) as dleaveDt1,";
                sqlCmd += "CONVERT(varchar(100), ReqDt2, 20) as dleaveDt2,CONVERT(float,AddTime) as fHours,* from t_OverTime where id=" + mainId;
                SqlSel.GetSqlSel(ref dt, sqlCmd);
                if (dt.Rows.Count > 0)
                {
                    if (dt.Rows[0]["stat"].ToString() == "0")
                    {
                        label_status.Text = "待审批";
                    }
                    if (dt.Rows[0]["stat"].ToString() == "1")
                    {
                        label_status.Text = "已完成";
                    }
                    label_dept.Text      = dt.Rows[0]["bm1"].ToString();
                    label_name.Text      = dt.Rows[0]["name"].ToString();
                    label_startTime.Text = dt.Rows[0]["dleaveDt1"].ToString();
                    label_endTime.Text   = dt.Rows[0]["dleaveDt2"].ToString();
                    label_reqTime.Text   = dt.Rows[0]["dReqDte"].ToString();
                    label_hours.Text     = dt.Rows[0]["fHours"].ToString();
                    label_desc.Text      = dt.Rows[0]["Reason"].ToString();

                    //添加请假人员明细
                    sqlCmd  = "select View_Rs_employeeinfo.Name,Rs_QjAndJb_Subdtl.Yhbh from Rs_QjAndJb_Subdtl inner join ";
                    sqlCmd += "View_Rs_employeeinfo on Rs_QjAndJb_Subdtl.Yhbh = View_Rs_employeeinfo.Gh_id where Rs_QjAndJb_Subdtl.MainId='" + mainId + "' and Rs_QjAndJb_Subdtl.Typ = '1'";
                    DataTable dt_persondtl = new DataTable();
                    SqlSel.GetSqlSel(ref dt_persondtl, sqlCmd);
                    StringBuilder strbuilder = new StringBuilder();
                    int           rowscount  = dt_persondtl.Rows.Count;
                    for (int i = 0; i < rowscount; i++)
                    {
                        String jbry = dt_persondtl.Rows[i]["Name"].ToString().Trim() + "/" + dt_persondtl.Rows[i]["Yhbh"].ToString();
                        strbuilder.AppendFormat("{0};", jbry);
                    }
                    label_personDtl.Text = strbuilder.ToString();

                    //是否可以审批
                    if (dt.Rows[0]["stat"].ToString() != "0")
                    {
                        btnSubmit.Hidden = true;//隐藏审批按钮
                    }
                }
                else
                {
                    SimpleForm1.Hidden = true;
                    HttpContext.Current.Response.Write("信息不存在或非企业内部人员!");
                }
            }
            catch (Exception ex)
            {
                Alert.ShowInTop(ex.Message);
            }
        }
コード例 #18
0
        private void loadInfo(string formId)
        {
            string sqlCmd = "select A.*,c.chineseName,d.deptName,t.projName from OA_Fines_Main A left join OA_Sys_step_empList B on B.formId=A.id";

            sqlCmd += " left join OA_Sys_EmployeeInfo c on c.id=a.reqMan left join OA_sys_department d on d.id=c.deptId left join OA_sys_Project t on t.id=a.ProjId where a.id='" + formId + "'";
            DataTable dt = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);

            label_name.Text     = dt.Rows[0]["chineseName"].ToString() + "/" + dt.Rows[0]["deptName"].ToString();
            label_date.Text     = Convert.ToDateTime(dt.Rows[0]["reqDte"]).ToShortDateString();
            label_total.Text    = dt.Rows[0]["fineAmount"].ToString();
            label_reason.Text   = dt.Rows[0]["ReqReason"].ToString();
            label_proj.Text     = dt.Rows[0]["projName"].ToString();
            label_count.Text    = dt.Rows[0]["Objects"].ToString();
            label_proveEmp.Text = dt.Rows[0]["ProveEmp"].ToString();

            //加载附件信息
            bindHidden(formId, "OA_Fines_Main");
            //加载证明人信息
            loadProvInfo(formId);

            //
            loadCostItems(formId);
        }
コード例 #19
0
        protected void btn1_Click(object sender, EventArgs e)
        {
            DataTable dt      = new DataTable();
            string    ddlsStr = txt_ddls.Value;

            String[] str = ddlsStr.Split(';');

            foreach (string it in str)
            {
                if (it == "")
                {
                    break;
                }
                //获取订单流水
                int recId = Convert.ToInt32(it);
                //
                string sqlCmd = "select * from T_Print_dtl where RecID=" + recId;
                SqlSel.GetSqlSel(ref dt, sqlCmd);
                if (dt.Rows.Count > 0)
                {
                    continue;
                }
                else
                {
                    sqlCmd = "insert into T_Print_dtl (IsPrint,PrintTime,RecID) values (1,'" + DateTime.Now + "'," + recId + ")";
                    SqlSel.ExeSql(sqlCmd);
                }
            }
        }
コード例 #20
0
        /// <summary>
        /// 根据表单类型和岗位加载可用流程
        /// </summary>
        /// <param name="formName">表单类型名称</param>
        /// <param name="userId">用户id</param>
        /// <returns>流程相关信息</returns>
        public static DataTable validFlow(string formName, string userId)
        {
            //表单关联所有流程
            string    sqlCmd = "select B.flowName,B.id from OA_Sys_FlowRelForm A left join OA_sys_flow B on A.flowId=B.id where A.formDataName='" + formName + "' and B.isUsed='1'";
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            //获取登录用户岗位
            sqlCmd = "select dutyId from OA_Sys_EmployeeInfo where id='" + userId + "'";
            string userDuty = SqlSel.GetSqlScale(sqlCmd).ToString();

            //遍历流程,没有指定岗位的显示,指定岗位但人员不在列的不显示
            for (int rowIndex = 0; rowIndex < dt.Rows.Count; rowIndex++)
            {
                string compFlowId = dt.Rows[rowIndex]["id"].ToString();
                sqlCmd = "select * from OA_Sys_FlowRelDuty where flowId='" + compFlowId + "'";
                DataTable tempDt = new DataTable();
                SqlSel.GetSqlSel(ref tempDt, sqlCmd);
                if (tempDt.Rows.Count > 0)
                {
                    DataRow[] findRow = tempDt.Select("dutyId='" + userDuty + "' ");
                    if (findRow.Length == 0)
                    {
                        dt.Rows.RemoveAt(rowIndex);
                    }
                }
            }
            return(dt);
        }
コード例 #21
0
 private void ddlBind(string loadType)
 {
     try
     {
         string    sqlCmd = "select * from OA_Sys_Menu where ParentMenuId=0 and enabled=1";
         DataTable dt     = new DataTable();
         SqlSel.GetSqlSel(ref dt, sqlCmd);
         ddl_parentMenu.DataTextField  = "title";
         ddl_parentMenu.DataValueField = "id";
         ddl_parentMenu.DataSource     = dt;
         ddl_parentMenu.DataBind();
         ddl_parentMenu.Items.Insert(0, new ListItem("根目录", ""));
         if (loadType != "0")//非新建菜单绑定现有数据
         {
             sqlCmd = "select * from OA_Sys_Menu where id='" + recvId + "'";
             SqlSel.GetSqlSel(ref dt, sqlCmd);
             txb_title.Text = dt.Rows[0]["Title"].ToString();
             txb_url.Text   = dt.Rows[0]["NavigateUrl"].ToString();
             txa_desc.Text  = dt.Rows[0]["Remark"].ToString();
             if (!string.IsNullOrEmpty(dt.Rows[0]["ParentMenuId"].ToString()))
             {
                 ddl_parentMenu.SelectedValue = dt.Rows[0]["ParentMenuId"].ToString();
             }
         }
     }
     catch (Exception ex)
     {
         Alert.ShowInTop(ex.Message);
         return;
     }
 }
コード例 #22
0
        private void loadDutyList()
        {
            string    sqlCmd = "select * from OA_sys_Duties";
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            cbl_duty.DataValueField = "id";
            cbl_duty.DataTextField  = "DutyName";
            cbl_duty.DataSource     = dt;
            cbl_duty.DataBind();


            //加载已绑定岗位列表
            sqlCmd = "select * from OA_DocMgmt_DocType_RelDuty where docTypeId='" + typeId + "'";
            SqlSel.GetSqlSel(ref dt, sqlCmd);
            string[] formArray = new string[dt.Rows.Count];
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                try
                {
                    formArray[i] = dt.Rows[i]["dutyId"].ToString();
                }
                catch (Exception ex)
                {
                    Alert.ShowInTop(ex.Message);
                }
            }
            cbl_duty.SelectedValueArray = formArray;
        }
コード例 #23
0
        protected void loadHead(string mainId)
        {
            String    sqlcmd = "select * from T_DailyWork left join view_rs_employeeinfo on WorkNo=gh_id where T_DailyWork.Id =" + mainId + " and T_DailyWork.stat>0";
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlcmd);
            if (dt.Rows.Count > 0)
            {
                DateTime reqdate = Convert.ToDateTime(dt.Rows[0]["WorkDte"]);
                label_date.Text     = reqdate.ToShortDateString();
                label_dept.Text     = dt.Rows[0]["bm1"].ToString();
                label_name.Text     = dt.Rows[0]["name"].ToString();
                label_selfGoal.Text = dt.Rows[0]["SelfGrade"].ToString() + " 分";
                label_hidden.Text   = dt.Rows[0]["workNo"].ToString();
                //加载工作内容明细
                loadWorkDetail(mainId);
            }
            else
            {
                SimpleForm1.Hidden = true;
                HttpContext.Current.Response.Write("信息不存在或非企业内部人员!");
            }

            //判断日志状态
            if (!string.IsNullOrEmpty(dt.Rows[0]["LeaderGrade"].ToString()))
            {
                btnSubmit.Hidden = true;
                RadioButtonList_goal.SelectedValue = dt.Rows[0]["LeaderGrade"].ToString();
                RadioButtonList_goal.Readonly      = true;
                TextArea_context.Text     = dt.Rows[0]["LeaderGradeReason"].ToString();
                TextArea_context.Readonly = true;
            }
        }
コード例 #24
0
        private void loadInfo(string formId)
        {
            string sqlCmd = "select A.*,c.chineseName,d.deptName,t.projName from OA_Bills_Main A ";

            sqlCmd += " left join OA_Sys_EmployeeInfo c on c.id=a.reqMan left join OA_sys_department d on d.id=c.deptId left join OA_sys_Project t on t.id=a.RelProj where A.id='" + formId + "'";
            DataTable dt = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);

            label_name.Text     = dt.Rows[0]["chineseName"].ToString() + "/" + dt.Rows[0]["deptName"].ToString();
            label_date.Text     = Convert.ToDateTime(dt.Rows[0]["reqDte"]).ToShortDateString();
            label_count.Text    = dt.Rows[0]["VoucherCount"].ToString();
            label_total.Text    = dt.Rows[0]["billTotal"].ToString();
            label_reason.Text   = dt.Rows[0]["ReqReason"].ToString();
            label_proj.Text     = dt.Rows[0]["projName"].ToString();
            label_proveEmp.Text = dt.Rows[0]["ProveEmp"].ToString();

            //加载附件信息
            bindHidden(formId, "OA_Bills_Main");
            //加载证明人信息
            //loadProvInfo(formId);

            //
            loadCostItems(formId);

            //
            bindCheckDetail(formId, "OA_Bills_Main");
        }
コード例 #25
0
ファイル: FlowMgmt_flowEdit.aspx.cs プロジェクト: yykxia/OA
        //
        private void loadInfo()
        {
            string    sqlCmd = "select * from OA_sys_flow where id=" + recvId;;
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            txb_flowName.Text = dt.Rows[0]["flowName"].ToString();
            txa_flowDesc.Text = dt.Rows[0]["flowDesc"].ToString();

            int useStatus = Convert.ToInt32(dt.Rows[0]["isUsed"]);

            //是否在用
            if (useStatus == 0)
            {
                ckeckBox_enabled.Checked = false;
            }
            else
            {
                ckeckBox_enabled.Checked = true;
            }

            //加载表单关联信息
            sqlCmd = "select * from OA_Sys_FlowRelForm where flowId='" + recvId + "'";
            DataTable temDt = new DataTable();

            SqlSel.GetSqlSel(ref temDt, sqlCmd);
            string[] formArray = new string[temDt.Rows.Count];
            for (int i = 0; i < temDt.Rows.Count; i++)
            {
                try
                {
                    formArray[i] = temDt.Rows[i]["formDataName"].ToString();
                }
                catch (Exception ex)
                {
                    Alert.ShowInTop(ex.Message, "插入表单信息出错!");
                }
            }
            cbl_relForm.SelectedValueArray = formArray;

            //关联岗位勾选
            sqlCmd = "select * from OA_Sys_FlowRelDuty where flowId='" + recvId + "'";
            DataTable dutyDt = new DataTable();

            SqlSel.GetSqlSel(ref dutyDt, sqlCmd);
            string[] dutyArray = new string[dutyDt.Rows.Count];
            for (int i = 0; i < dutyDt.Rows.Count; i++)
            {
                try
                {
                    dutyArray[i] = dutyDt.Rows[i]["dutyId"].ToString();
                }
                catch (Exception ex)
                {
                    Alert.ShowInTop(ex.Message, "插入岗位信息出错!");
                }
            }
            cbl_relDuty.SelectedValueArray = dutyArray;
        }
コード例 #26
0
        private DataTable getUserInfo(string userId)
        {
            string    sqlCmd = "select * from OA_Sys_EmployeeInfo where id='" + userId + "'";
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            return(dt);
        }
コード例 #27
0
ファイル: FlowMgmt_newNode.aspx.cs プロジェクト: yykxia/OA
        private void loadStepInfo()
        {
            string    sqlCmd = "select * from OA_Sys_Flow_Step where id=" + recvId;
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            label_stepName.Text = dt.Rows[0]["stepName"].ToString();
        }
コード例 #28
0
        //
        private void loadInfo()
        {
            string    sqlCmd = "select * from OA_sys_flow where id=" + recvId;
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            label_flowName.Text = dt.Rows[0]["flowName"].ToString();
        }
コード例 #29
0
ファイル: main.aspx.cs プロジェクト: yykxia/OA
        //首页加载公告信息
        private void bindGrid()
        {
            string    sqlCmd = "select * from OA_Announcement where isDeleted='0' order by CreateTime desc";
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            Grid1.DataSource = dt;
            Grid1.DataBind();
        }
コード例 #30
0
        private void bindGrid2(string flowId)
        {
            string    sqlCmd = "select * from OA_Sys_Flow_Step where flowId='" + flowId + "' order by stepOrderNo";
            DataTable dt     = new DataTable();

            SqlSel.GetSqlSel(ref dt, sqlCmd);
            Grid2.DataSource = dt;
            Grid2.DataBind();
        }