Beispiel #1
0
        public clsWDataSet.clsReturnObject FillRadioList(WebControl ctlControl, string strSPName, string[] strKeyName, object[] strKeyValue, string DisPlayMember, string ValueMember)
        {
            clsWDataSet objWDataSet = new clsWDataSet();

            try
            {
                DataTable dtltemp;
                clsWDataSet.clsReturnObject objReturn;
                objReturn = objWDataSet.GetAllRecordsByNID(strSPName, strKeyName, strKeyValue);

                if (objReturn.intCode != 0)
                {
                    if (ctlControl.GetType() == typeof(RadioButtonList))
                    {
                        RadioButtonList cbo = (RadioButtonList)ctlControl;
                        dtltemp            = objReturn.dstResult.Tables[0];
                        cbo.DataTextField  = DisPlayMember;
                        cbo.DataValueField = ValueMember;
                        cbo.DataSource     = dtltemp;
                        cbo.DataBind();
                    }
                }
                return(objReturn);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Beispiel #2
0
        public clsWDataSet.clsReturnObject FillDataList(WebControl ctlControl, string strSPName, string[] strKeyName, object[] strKeyValue)
        {
            clsWDataSet objWDataSet = new clsWDataSet();

            try
            {
                DataTable dtltemp;
                clsWDataSet.clsReturnObject objReturn;
                objReturn = objWDataSet.GetAllRecordsByNID(strSPName, strKeyName, strKeyValue);


                if (objReturn.intCode != 0)
                {
                    if (ctlControl.GetType() == typeof(DataList))
                    {
                        DataList dl = (DataList)ctlControl;
                        dtltemp       = objReturn.dstResult.Tables[0];
                        dl.DataSource = dtltemp;
                        dl.DataBind();
                    }
                }
                return(objReturn);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Beispiel #3
0
        public clsWDataSet.clsReturnObject FillDDL(object[] ctlControl, string strSPName, string[] strKeyName, object[] strKeyValue, string[] DisPlayMember, string[] ValueMember)
        {
            clsWDataSet objWDataSet = new clsWDataSet();

            try
            {
                DataTable dtltemp;
                clsWDataSet.clsReturnObject objReturn;
                objReturn = objWDataSet.GetAllRecordsByNID(strSPName, strKeyName, strKeyValue);

                if (objReturn.intCode != 0)
                {
                    for (int i = 0; i < ctlControl.Length; i++)
                    {
                        //if (ctlControl.GetType() == typeof(DropDownList))
                        //{
                        DropDownList cbo = (DropDownList)ctlControl[i];
                        dtltemp            = objReturn.dstResult.Tables[i];
                        cbo.DataTextField  = DisPlayMember[i];
                        cbo.DataValueField = ValueMember[i];
                        cbo.DataSource     = dtltemp;
                        cbo.DataBind();
                        //}
                    }
                }
                return(objReturn);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Beispiel #4
0
        public clsWDataSet.clsReturnObject FillTextBox(WebControl ctlControl, string strSPName, string[] strKeyName, object[] strKeyValue)
        {
            clsWDataSet objWDataSet = new clsWDataSet();

            try
            {
                DataTable dtltemp;
                clsWDataSet.clsReturnObject objReturn;
                objReturn = objWDataSet.GetAllRecordsByNID(strSPName, strKeyName, strKeyValue);

                if (objReturn.intCode != 0)
                {
                    if (ctlControl.GetType() == typeof(System.Web.UI.WebControls.TextBox))
                    {
                        System.Web.UI.WebControls.TextBox txt = (System.Web.UI.WebControls.TextBox)ctlControl;
                        dtltemp  = objReturn.dstResult.Tables[0];
                        txt.Text = Convert.ToString(objReturn.dstResult.Tables[0].Rows[0]["BodyContent"]);
                    }
                }
                return(objReturn);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Beispiel #5
0
        public clsWDataSet.clsReturnObject ExecSP(string strSPName)
        {
            clsWDataSet objWDataSet = new clsWDataSet();

            try
            {
                clsWDataSet.clsReturnObject objReturnObject = new clsWDataSet.clsReturnObject();

                objReturnObject = objWDataSet.GetAllRecordsByNID(strSPName);
                return(objReturnObject);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Beispiel #6
0
        public clsWDataSet.clsReturnObject ExecSP(string strSPName, string[] strKeyName, object[] strKeyValue, int CommandTimeOut)
        {
            clsWDataSet objWDataSet = new clsWDataSet();

            try
            {
                clsWDataSet.clsReturnObject objReturnObject = new clsWDataSet.clsReturnObject();


                objReturnObject = objWDataSet.GetAllRecordsByNID(strSPName, strKeyName, strKeyValue, CommandTimeOut);
                return(objReturnObject);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }