Esempio n. 1
0
        /// <summary>
        /// 得到员工上下班时间
        /// </summary>
        public DutyTime GetDutyTime()
        {
            UDS.Components.Database db = new UDS.Components.Database();
            DutyTime dt = new DutyTime();

            System.Data.SqlClient.SqlParameter[] prams =
            {
                db.MakeInParam("@staffid",      System.Data.SqlDbType.Int,            4, staffid),
                db.MakeOutParam("@ondutytime",  System.Data.SqlDbType.SmallDateTime, 8),
                db.MakeOutParam("@offdutytime", System.Data.SqlDbType.SmallDateTime, 8)
            };
            if (db.RunProc("sp_WA_GetDutyTime", prams) != 0)
            {
                throw(new Exception("读取人员上下班时间出错"));
            }
            else
            {
                dt.OnDutyTime  = (System.DateTime)prams[1].Value;
                dt.OffDutyTime = (System.DateTime)prams[2].Value;
                return(dt);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// ͨ�����ID�õ�����ģ����
        /// </summary>
        /// <param name="FlowID">����ID</param>
        public string GetStyleTemplateEx(long StyleID)
        {
            string str="";
            UDS.Components.Database mySQL = new UDS.Components.Database();
            SqlParameter[] parameters = {
                                            mySQL.MakeInParam("@StyleID",SqlDbType.Int ,4,StyleID),
                                            mySQL.MakeOutParam("@Template",SqlDbType.VarChar,100)
                                        };

            try
            {
                mySQL.RunProc("sp_Flow_GetStyleTemplateEx",parameters);
                str = parameters[1].Value.ToString();
            }
            catch(Exception e)
            {
                Error.Log(e.ToString());
                throw new Exception("��ñ��ģ�����!",e);
            }
            finally
            {
                mySQL.Close();
                mySQL = null;
            }

            if(str.Length>0)
                return @"Template\" + str;
            else
                return "";
        }
Esempio n. 3
0
File: WA.cs Progetto: blfsir/benzoa
 /// <summary>
 /// �õ�Ա�����°�ʱ��
 /// </summary>
 /// <param name="Staffid">Ա��id</param>
 public DutyTime GetDutyTime(int Staffid)
 {
     staffid = Staffid;
     UDS.Components.Database db = new UDS.Components.Database();
     DutyTime dt = new DutyTime();
     System.Data.SqlClient.SqlParameter[] prams = {
                                                    db.MakeInParam("@staffid",System.Data.SqlDbType.Int,4,staffid),
                                                    db.MakeOutParam("@ondutytime",System.Data.SqlDbType.DateTime,8),
                                                    db.MakeOutParam("@offdutytime",System.Data.SqlDbType.DateTime,8)
                                                };
     if(db.RunProc("sp_WA_GetDutyTime",prams)!=0)
     {
         throw(new Exception("��ȡ��Ա���°�ʱ�����"));
     }
     else
     {
         dt.OnDutyTime = (System.DateTime)prams[1].Value;
         dt.OffDutyTime = (System.DateTime)prams[2].Value;
         return dt;
     }
 }