public string MarkInfo(string barcode)
        {
            string sql = string.Format("select cmdm,sphh from yx_t_tmb where tzid=1 and tmlx=1 and tm='{0}'", barcode);
            SortedDictionary <string, string> row = get_row(sql);
            MarkInfo m = new MarkInfo();

            m.Sphh = row["sphh"];

            string cmdm = row["cmdm"];

            sql = string.Format("select tml,splbid,lsdj from yx_t_spdmb where sphh='{0}'", m.Sphh);
            row = get_row(sql);

            m.Lsdj = row["lsdj"];
            string lbid = row["splbid"];
            string tml  = row["tml"];

            sql = string.Format("select top 1 box from yx_v_dddjcmmx where djlx=905 and sphh='{0}'", m.Sphh);
            row = get_row(sql);
            string box = row["box"];

            sql  = string.Format("select hx,gg from yx_T_spggb where splbid={0} and lx='{1}' and cmdm='{2}'", lbid, box, cmdm);
            row  = get_row(sql);
            m.Hx = row["hx"];
            m.Gg = row["gg"];

            return(nrWebClass.xmlHelper.ToString <MarkInfo>(m));
        }
 private void onClick(IMSmyMark mark)
 {
     if (markInfo == null)
     {
         //如果markInfo为空,则实例化markInfo控件,并设置其相关属性
         markInfo = new MarkInfo();
         markInfo.placename.Text = mark.markName;
         markInfo.xInfo.Text     = mark.X.ToString();
         markInfo.yInfo.Text     = mark.Y.ToString();
         markInfo.mapContainer   = iMSMap1;
         if (markLayer1.EnablePolymericMark)
         {
             markInfo.logicX = this.iMSMap1.MouseDownLogicPnt.X;
             markInfo.logicY = this.iMSMap1.MouseDownLogicPnt.Y;
         }
         else
         {
             markInfo.logicX = mark.X;
             markInfo.logicY = mark.Y;
         }
         markInfo.updateposition();
         markInfo.Show();
     }
     else
     {//如果markInfo不为空,直接赋值
         markInfo.placename.Text = mark.markName;
         markInfo.xInfo.Text     = mark.X.ToString();
         markInfo.yInfo.Text     = mark.Y.ToString();
         markInfo.mapContainer   = iMSMap1;
         if (markLayer1.EnablePolymericMark)
         {
             markInfo.logicX = this.iMSMap1.MouseDownLogicPnt.X;
             markInfo.logicY = this.iMSMap1.MouseDownLogicPnt.Y;
         }
         else
         {
             markInfo.logicX = mark.X;
             markInfo.logicY = mark.Y;
         }
         markInfo.updateposition();
         markInfo.Show();
     }
 }
示例#3
0
        private static void AssignMarks(LtpCourse course, JsonObject marksObject)
        {
            if (marksObject.GetNamedBoolean("supported") == false)
            {
                course.InternalMarksScored = 0;
                course.TotalMarksTested    = 0;
                return;
            }

            double    marksScored = 0;
            JsonArray marksArray  = marksObject.GetNamedArray("assessments");

            foreach (JsonValue marksValue in marksArray)
            {
                JsonObject markStubObject = marksValue.GetObject();
                string     title          = markStubObject.GetNamedString("title").ToUpper();
                int        maxMarks       = (int)markStubObject.GetNamedNumber("max_marks");
                int        weightage      = (int)markStubObject.GetNamedNumber("weightage");

                MarkInfo markInfo;
                if (markStubObject.GetNamedValue("scored_marks").ValueType == JsonValueType.Null)
                {
                    markInfo = new MarkInfo(course, title, maxMarks, weightage, null, null, "");
                }
                else
                {
                    markInfo = new MarkInfo(course, title, maxMarks, weightage,
                                            null, // currently, 'conducted date' is being skipped.
                                            markStubObject.GetNamedNumber("scored_marks"),
                                            markStubObject.GetNamedString("status").ToUpper());

                    marksScored             += (double)markInfo.WeightedMarks;
                    course.TotalMarksTested += markInfo.Weightage;
                }
                course.AddMarkInfo(markInfo);
            }

            course.InternalMarksScored = Math.Round(marksScored, 2);
        }
示例#4
0
文件: zues.cs 项目: ozotony/ipocldng
 public List<MarkInfo> getAcceptanceMarkInfoRSX(string status, string start, string limit)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     SqlConnection connection = new SqlConnection(this.Connect());
     SqlCommand command = new SqlCommand("WITH RSTbl AS (select mark_info.xID,mark_info.reg_number,mark_info.product_title,mark_info.tm_typeID,mark_info.reg_date,mark_info.log_staff, ROW_NUMBER() OVER (ORDER BY mark_info.xID) AS 'RowRank' from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE   pwallet.stage='5' AND pwallet.status<>'33' AND pwallet.status<>'22' AND CAST(pwallet.status AS INT)>=5  )SELECT * FROM RSTbl  WHERE RowRank BETWEEN '" + start + "' AND '" + limit + "' ", connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         MarkInfo info2 = new MarkInfo();
         info2.xID = reader["xID"].ToString();
         info2.reg_number = reader["reg_number"].ToString();
         info2.tm_typeID = reader["tm_typeID"].ToString();
         info2.product_title = reader["product_title"].ToString();
         info2.log_staff = reader["log_staff"].ToString();
         info2.reg_date = reader["reg_date"].ToString();
         MarkInfo item = info2;
         list.Add(item);
     }
     reader.Close();
     return list;
 }
示例#5
0
文件: zues.cs 项目: ozotony/ipocldng
 public List<MarkInfo> getSearchMarkInfoRS(string kword, List<string> fulltext, string cri)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     string cmdText = "";
     string str2 = "";
     string str3 = "";
     string str4 = "";
     int num = 0;
     SqlConnection connection = new SqlConnection(this.Connect());
     if (fulltext == null)
     {
         if (cri == "0")
         {
             cmdText = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE (pwallet.status <>'22') AND (pwallet.status <>'33') AND (pwallet.status >'5') AND (product_title like '%" + kword + "%') ORDER BY xID ASC";
         }
         else
         {
             cmdText = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE (pwallet.status <>'22') AND (pwallet.status <>'33') AND (pwallet.status >'5') AND (product_title like '%" + kword + "%') AND national_classID = '" + cri + "' ORDER BY xID ASC";
         }
     }
     else
     {
         num = fulltext.Count - 1;
         if (cri == "0")
         {
             str2 = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE (pwallet.status <>'22') AND (pwallet.status <>'33') AND (pwallet.status >'5') AND ";
         }
         else
         {
             str2 = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE (pwallet.status <>'22') AND (pwallet.status <>'33') AND (pwallet.status >'5') AND (national_classID = '" + cri + "') AND ";
         }
         for (int i = 0; i < fulltext.Count; i++)
         {
             if (fulltext.Count == 1)
             {
                 str3 = str3 + " ( product_title like '%" + fulltext[i] + "%' ) ";
             }
             else if (num == i)
             {
                 str3 = str3 + " ( product_title like '%" + fulltext[i] + "%' ) ";
             }
             else
             {
                 str3 = str3 + " ( product_title like '%" + fulltext[i] + "%' ) OR";
             }
         }
         str4 = " ORDER BY xID ASC";
         cmdText = str2 + str3 + str4;
     }
     SqlCommand command = new SqlCommand(cmdText, connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         MarkInfo info2 = new MarkInfo();
         info2.xID = reader["xID"].ToString();
         info2.reg_number = reader["reg_number"].ToString();
         info2.tm_typeID = reader["tm_typeID"].ToString();
         info2.logo_descriptionID = reader["logo_descriptionID"].ToString();
         info2.national_classID = reader["national_classID"].ToString();
         info2.product_title = reader["product_title"].ToString();
         info2.nice_class = reader["nice_class"].ToString();
         info2.nice_class_desc = reader["nice_class_desc"].ToString();
         info2.sign_type = reader["sign_type"].ToString();
         info2.vienna_class = reader["vienna_class"].ToString();
         info2.disclaimer = reader["disclaimer"].ToString();
         info2.logo_pic = reader["logo_pic"].ToString();
         info2.auth_doc = reader["auth_doc"].ToString();
         info2.sup_doc1 = reader["sup_doc1"].ToString();
         info2.sup_doc2 = reader["sup_doc2"].ToString();
         info2.log_staff = reader["log_staff"].ToString();
         info2.reg_date = reader["reg_date"].ToString();
         info2.xvisible = reader["xvisible"].ToString();
         MarkInfo item = info2;
         list.Add(item);
     }
     reader.Close();
     return list;
 }
示例#6
0
文件: zues.cs 项目: ozotony/ipocldng
 public List<MarkInfo> getMarkInfoSlipPlusRS(string stage)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     SqlConnection connection = new SqlConnection(this.Connect());
     SqlCommand command = new SqlCommand("SELECT mark_info.*  FROM pwallet LEFT OUTER JOIN mark_info ON pwallet.ID=mark_info.log_staff WHERE pwallet.status >= '" + stage + "' AND mark_info.log_staff IN (Select ID  FROM pwallet) ORDER BY ID ASC", connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         MarkInfo info2 = new MarkInfo();
         info2.xID = reader["xID"].ToString();
         info2.reg_number = reader["reg_number"].ToString();
         info2.tm_typeID = reader["tm_typeID"].ToString();
         info2.logo_descriptionID = reader["logo_descriptionID"].ToString();
         info2.national_classID = reader["national_classID"].ToString();
         info2.product_title = reader["product_title"].ToString();
         info2.nice_class = reader["nice_class"].ToString();
         info2.nice_class_desc = reader["nice_class_desc"].ToString();
         info2.sign_type = reader["sign_type"].ToString();
         info2.vienna_class = reader["vienna_class"].ToString();
         info2.disclaimer = reader["disclaimer"].ToString();
         info2.logo_pic = reader["logo_pic"].ToString();
         info2.auth_doc = reader["auth_doc"].ToString();
         info2.sup_doc1 = reader["sup_doc1"].ToString();
         info2.sup_doc2 = reader["sup_doc2"].ToString();
         info2.log_staff = reader["log_staff"].ToString();
         info2.reg_date = reader["reg_date"].ToString();
         info2.xvisible = reader["xvisible"].ToString();
         MarkInfo item = info2;
         list.Add(item);
     }
     reader.Close();
     return list;
 }
示例#7
0
文件: Retriever.cs 项目: ozotony/payx
        public MarkInfo getMarkInfo(string stage)
        {
            List<MarkInfo> list = new List<MarkInfo>();
            new MarkInfo();
            SqlConnection connection = new SqlConnection(this.Connect());
            SqlCommand command = new SqlCommand("select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.ID ='" + stage + "'  ", connection);
            connection.Open();
            SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            MarkInfo item = new MarkInfo();

            while (reader.Read())
            {
                 item = new MarkInfo
                {
                    xID = reader["xID"].ToString(),
                    reg_number = reader["reg_number"].ToString(),
                    tm_typeID = reader["tm_typeID"].ToString(),
                    logo_descriptionID = reader["logo_descriptionID"].ToString(),
                    national_classID = reader["national_classID"].ToString(),
                    product_title = reader["product_title"].ToString(),
                    nice_class = reader["nice_class"].ToString(),
                    nice_class_desc = reader["nice_class_desc"].ToString(),
                    sign_type = reader["sign_type"].ToString(),
                    vienna_class = reader["vienna_class"].ToString(),
                    disclaimer = reader["disclaimer"].ToString(),
                    logo_pic = reader["logo_pic"].ToString(),
                    auth_doc = reader["auth_doc"].ToString(),
                    sup_doc1 = reader["sup_doc1"].ToString(),
                    sup_doc2 = reader["sup_doc2"].ToString(),
                    log_staff = reader["log_staff"].ToString(),
                    reg_date = reader["reg_date"].ToString(),
                    xvisible = reader["xvisible"].ToString()
                };
               // list.Add(item);
            }
            reader.Close();
            connection.Close();
            return item;
        }
示例#8
0
文件: zues.cs 项目: ozotony/ipocldng
 public List<MarkInfo> getMarkInfoRS(string status, string data_status)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     SqlConnection connection = new SqlConnection(this.Connect());
     SqlCommand command = null;
     if ((status == "4") && ((data_status == "Refused") || (data_status == "Non-registrable")))
     {
         command = new SqlCommand("select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.stage='5' AND pwallet.status='" + status + "' AND ((pwallet.data_status='Non-registrable') OR (pwallet.data_status='Refused')) ORDER BY xID ASC", connection);
     }
     else
     {
         command = new SqlCommand("select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.stage='5' AND pwallet.status='" + status + "' AND pwallet.data_status='" + data_status + "' ORDER BY xID ASC", connection);
     }
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         MarkInfo info2 = new MarkInfo();
         info2.xID = reader["xID"].ToString();
         info2.reg_number = reader["reg_number"].ToString();
         info2.tm_typeID = reader["tm_typeID"].ToString();
         info2.logo_descriptionID = reader["logo_descriptionID"].ToString();
         info2.national_classID = reader["national_classID"].ToString();
         info2.product_title = reader["product_title"].ToString();
         info2.nice_class = reader["nice_class"].ToString();
         info2.nice_class_desc = reader["nice_class_desc"].ToString();
         info2.sign_type = reader["sign_type"].ToString();
         info2.vienna_class = reader["vienna_class"].ToString();
         info2.disclaimer = reader["disclaimer"].ToString();
         info2.logo_pic = reader["logo_pic"].ToString();
         info2.auth_doc = reader["auth_doc"].ToString();
         info2.sup_doc1 = reader["sup_doc1"].ToString();
         info2.sup_doc2 = reader["sup_doc2"].ToString();
         info2.log_staff = reader["log_staff"].ToString();
         info2.reg_date = reader["reg_date"].ToString();
         info2.xvisible = reader["xvisible"].ToString();
         MarkInfo item = info2;
         list.Add(item);
     }
     reader.Close();
     return list;
 }
示例#9
0
文件: zues.cs 项目: ozotony/ipocldng
 public List<MarkInfo> getMarkInfoByDataStatusRS(string stage, string data_status)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     SqlConnection connection = new SqlConnection(this.Connect());
     SqlCommand command = new SqlCommand("select * from mark_info LEFT OUTER JOIN tm_office ON mark_info.log_staff=tm_office.pwalletID WHERE tm_office.admin_status='" + stage + "' AND tm_office.data_status='" + data_status + "' ORDER BY xID ASC", connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         MarkInfo info2 = new MarkInfo();
         info2.xID = reader["xID"].ToString();
         info2.reg_number = reader["reg_number"].ToString();
         info2.tm_typeID = reader["tm_typeID"].ToString();
         info2.logo_descriptionID = reader["logo_descriptionID"].ToString();
         info2.national_classID = reader["national_classID"].ToString();
         info2.product_title = reader["product_title"].ToString();
         info2.nice_class = reader["nice_class"].ToString();
         info2.nice_class_desc = reader["nice_class_desc"].ToString();
         info2.sign_type = reader["sign_type"].ToString();
         info2.vienna_class = reader["vienna_class"].ToString();
         info2.disclaimer = reader["disclaimer"].ToString();
         info2.logo_pic = reader["logo_pic"].ToString();
         info2.auth_doc = reader["auth_doc"].ToString();
         info2.sup_doc1 = reader["sup_doc1"].ToString();
         info2.sup_doc2 = reader["sup_doc2"].ToString();
         info2.log_staff = reader["log_staff"].ToString();
         info2.reg_date = reader["reg_date"].ToString();
         info2.xvisible = reader["xvisible"].ToString();
         MarkInfo item = info2;
         list.Add(item);
     }
     reader.Close();
     return list;
 }
示例#10
0
文件: tm.cs 项目: ozotony/ipocldng
 public string addMark(MarkInfo c_mark, string pwalletID)
 {
     string str = "";
     if (c_mark.tm_typeID == null) {  c_mark.tm_typeID = ""; }
     if (c_mark.logo_descriptionID == null)  { c_mark.logo_descriptionID = ""; }
     if (c_mark.product_title == null) {c_mark.product_title = ""; }
     if (c_mark.nice_class == null){  c_mark.nice_class = ""; }
     if (c_mark.nice_class_desc == null)  {c_mark.nice_class_desc = "";  }
     if (c_mark.national_classID == null){c_mark.national_classID = "";}
     if (c_mark.disclaimer == null) {c_mark.disclaimer = "";}
     string connectionString = this.Connect();
     string str5 = "0";
     SqlConnection connection = new SqlConnection(connectionString);
     SqlCommand command = connection.CreateCommand();
     command.CommandText = "INSERT INTO mark_Info (reg_number,tm_typeID,logo_descriptionID,product_title,nice_class,nice_class_desc,national_classID,disclaimer,log_staff,reg_date,xvisible) VALUES (@reg_number,@tm_typeID,@logo_descriptionID,@product_title,@nice_class,@nice_class_desc,@national_classID,@disclaimer,@log_staff,@reg_date,@xvisible) SELECT SCOPE_IDENTITY()";
     connection.Open();
     command.Parameters.Add("@reg_number", SqlDbType.VarChar, 50);
     command.Parameters.Add("@tm_typeID", SqlDbType.NVarChar, 50);
     command.Parameters.Add("@logo_descriptionID", SqlDbType.NVarChar, 50);
     command.Parameters.Add("@product_title", SqlDbType.NVarChar);
     command.Parameters.Add("@nice_class", SqlDbType.VarChar, 50);
     command.Parameters.Add("@nice_class_desc", SqlDbType.NVarChar);
     command.Parameters.Add("@national_classID", SqlDbType.NVarChar, 50);
     command.Parameters.Add("@disclaimer", SqlDbType.VarChar);
     command.Parameters.Add("@log_staff", SqlDbType.VarChar, 50);
     command.Parameters.Add("@reg_date", SqlDbType.VarChar, 50);
     command.Parameters.Add("@xvisible", SqlDbType.VarChar, 1);
     command.Parameters["@reg_number"].Value = str;
     command.Parameters["@tm_typeID"].Value = c_mark.tm_typeID;
     command.Parameters["@logo_descriptionID"].Value = c_mark.logo_descriptionID;
     command.Parameters["@product_title"].Value = c_mark.product_title;
     command.Parameters["@nice_class"].Value = c_mark.nice_class;
     command.Parameters["@nice_class_desc"].Value = c_mark.nice_class_desc;
     command.Parameters["@national_classID"].Value = c_mark.national_classID;
     command.Parameters["@disclaimer"].Value = c_mark.disclaimer;
     command.Parameters["@log_staff"].Value = pwalletID;
     command.Parameters["@reg_date"].Value = c_mark.reg_date;
     command.Parameters["@xvisible"].Value = c_mark.xvisible;
     str5 = command.ExecuteScalar().ToString();
     connection.Close();
     return str5;
 }
示例#11
0
文件: tm.cs 项目: ozotony/ipocldng
 public string addCurrentTrademark(Applicant c_app, MarkInfo c_mark, AddressService c_aos, Representative c_rep, Address c_app_addy, Address c_rep_addy, string pwallet, string log_officer)
 {
     Stage s = getStageClassByUserID(pwallet);
     string xID = ""; string date = s.reg_date; string year = s.reg_date.Substring(0, 4);
     this.addCurrentApplicant(c_app, c_app_addy, pwallet, date);
     xID = this.addCurrentMark(c_mark, pwallet, date);
     this.updateCurrentMarkReg(xID, c_mark.tm_typeID, year);
     this.addCurrentAos(c_aos, pwallet, date);
     this.addCurrentRepresentative(c_rep, c_rep_addy, pwallet, date);
     this.updatePwalletStatus(pwallet, log_officer);
     return xID;
 }
示例#12
0
文件: tm.cs 项目: ozotony/ipocldng
 public List<MarkInfo> getMarkInfoByUserID(string ID)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     SqlConnection connection = new SqlConnection(this.Connect());
     SqlCommand command = new SqlCommand("SELECT * FROM mark_info WHERE log_staff='" + ID + "' ", connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         MarkInfo item = new MarkInfo {
             xID = reader["xID"].ToString(),
             reg_number = reader["reg_number"].ToString(),
             tm_typeID = reader["tm_typeID"].ToString(),
             logo_descriptionID = reader["logo_descriptionID"].ToString(),
             national_classID = reader["national_classID"].ToString(),
             product_title = reader["product_title"].ToString(),
             nice_class = reader["nice_class"].ToString(),
             nice_class_desc = reader["nice_class_desc"].ToString(),
             sign_type = reader["sign_type"].ToString(),
             vienna_class = reader["vienna_class"].ToString(),
             disclaimer = reader["disclaimer"].ToString(),
             logo_pic = reader["logo_pic"].ToString(),
             auth_doc = reader["auth_doc"].ToString(),
             sup_doc1 = reader["sup_doc1"].ToString(),
             sup_doc2 = reader["sup_doc2"].ToString(),
             log_staff = reader["log_staff"].ToString(),
             reg_date = reader["reg_date"].ToString(),
             xvisible = reader["xvisible"].ToString()
         };
         list.Add(item);
     }
     reader.Close();
     return list;
 }
示例#13
0
文件: zues.cs 项目: ozotony/payx
 public List<MarkInfo> getCriPublishMarkInfoRS(string stage, string data_status)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     string cmdText = "";
     SqlConnection connection = new SqlConnection(this.Connect());
     if (data_status == "Accepted")
     {
         cmdText = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.status='" + stage + "' AND ( pwallet.data_status = 'Accepted') AND ( pwallet.applicantID <> 'CLD/SA/22')  ORDER BY CAST(national_classID AS INT), xID ASC";
     }
     else if (data_status == "Deferred")
     {
         cmdText = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.status='" + stage + "' AND ( pwallet.data_status = 'Deferred') AND ( pwallet.applicantID <> 'CLD/SA/22') ORDER BY CAST(national_classID AS INT), xID ASC";
     }
     else if (data_status == "Published")
     {
         cmdText = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.status >'" + stage + "' AND ( pwallet.applicantID <> 'CLD/SA/22') ORDER BY CAST(national_classID AS INT), xID ASC ";
     }
     SqlCommand command = new SqlCommand(cmdText, connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         MarkInfo item = new MarkInfo {
             xID = reader["xID"].ToString(),
             reg_number = reader["reg_number"].ToString(),
             tm_typeID = reader["tm_typeID"].ToString(),
             logo_descriptionID = reader["logo_descriptionID"].ToString(),
             national_classID = reader["national_classID"].ToString(),
             product_title = reader["product_title"].ToString(),
             nice_class = reader["nice_class"].ToString(),
             nice_class_desc = reader["nice_class_desc"].ToString(),
             sign_type = reader["sign_type"].ToString(),
             vienna_class = reader["vienna_class"].ToString(),
             disclaimer = reader["disclaimer"].ToString(),
             logo_pic = reader["logo_pic"].ToString(),
             auth_doc = reader["auth_doc"].ToString(),
             sup_doc1 = reader["sup_doc1"].ToString(),
             sup_doc2 = reader["sup_doc2"].ToString(),
             log_staff = reader["log_staff"].ToString(),
             reg_date = reader["reg_date"].ToString(),
             xvisible = reader["xvisible"].ToString()
         };
         list.Add(item);
     }
     reader.Close();
     return list;
 }
示例#14
0
文件: zues.cs 项目: ozotony/payx
 public List<MarkInfo> getAcceptanceAdminSearchMarkInfoRS(string status, string criteria, List<string> fulltext, string dateFrom, string dateTo)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     string cmdText = "";
     string str2 = "";
     string str3 = "";
     string str4 = "";
     int num = 0;
     SqlConnection connection = new SqlConnection(this.Connect());
     if (criteria == "product_title")
     {
         num = fulltext.Count - 1;
         str2 = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.stage='5' AND pwallet.status<>'33' AND pwallet.status<>'22' AND CAST(pwallet.status AS INT)>=5 AND ";
         for (int i = 0; i < fulltext.Count; i++)
         {
             if (fulltext.Count == 1)
             {
                 str3 = str3 + " ( product_title like '%" + fulltext[i] + "%' ) ";
             }
             else if (num == i)
             {
                 str3 = str3 + " ( product_title like '%" + fulltext[i] + "%' ) ";
             }
             else
             {
                 str3 = str3 + " ( product_title like '%" + fulltext[i] + "%' ) OR";
             }
         }
         str4 = "AND pwallet.reg_date between '" + dateFrom + "' AND '" + dateTo + "' ORDER BY xID ASC";
         cmdText = str2 + str3 + str4;
     }
     else if (criteria == "app_number")
     {
         cmdText = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.stage='5' AND pwallet.status<>'33' AND pwallet.status<>'22' AND CAST(pwallet.status AS INT)>=5  AND pwallet.validationID like  '%" + fulltext[0] + "%' AND pwallet.reg_date between '" + dateFrom + "' AND '" + dateTo + "'  ORDER BY xID ASC ";
     }
     SqlCommand command = new SqlCommand(cmdText, connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         MarkInfo item = new MarkInfo {
             xID = reader["xID"].ToString(),
             reg_number = reader["reg_number"].ToString(),
             tm_typeID = reader["tm_typeID"].ToString(),
             logo_descriptionID = reader["logo_descriptionID"].ToString(),
             national_classID = reader["national_classID"].ToString(),
             product_title = reader["product_title"].ToString(),
             nice_class = reader["nice_class"].ToString(),
             nice_class_desc = reader["nice_class_desc"].ToString(),
             sign_type = reader["sign_type"].ToString(),
             vienna_class = reader["vienna_class"].ToString(),
             disclaimer = reader["disclaimer"].ToString(),
             logo_pic = reader["logo_pic"].ToString(),
             auth_doc = reader["auth_doc"].ToString(),
             sup_doc1 = reader["sup_doc1"].ToString(),
             sup_doc2 = reader["sup_doc2"].ToString(),
             log_staff = reader["log_staff"].ToString(),
             reg_date = reader["reg_date"].ToString(),
             xvisible = reader["xvisible"].ToString()
         };
         list.Add(item);
     }
     reader.Close();
     return list;
 }
示例#15
0
文件: zues.cs 项目: ozotony/payx
 public List<MarkInfo> getMarkInfoXRS(string stage, string status)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     SqlConnection connection = new SqlConnection(this.Connect());
     SqlCommand command = new SqlCommand("SELECT mark_info.*  FROM pwallet LEFT OUTER JOIN mark_info ON pwallet.ID=mark_info.log_staff LEFT OUTER JOIN tm_office ON tm_office.pwalletID=mark_info.log_staff WHERE pwallet.status = '" + stage + "'  AND tm_office.data_status='" + status + "' AND mark_info.log_staff IN (Select pwallet.ID  FROM pwallet) ORDER BY pwallet.ID DESC", connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         MarkInfo item = new MarkInfo {
             xID = reader["xID"].ToString(),
             reg_number = reader["reg_number"].ToString(),
             tm_typeID = reader["tm_typeID"].ToString(),
             logo_descriptionID = reader["logo_descriptionID"].ToString(),
             national_classID = reader["national_classID"].ToString(),
             product_title = reader["product_title"].ToString(),
             nice_class = reader["nice_class"].ToString(),
             nice_class_desc = reader["nice_class_desc"].ToString(),
             sign_type = reader["sign_type"].ToString(),
             vienna_class = reader["vienna_class"].ToString(),
             disclaimer = reader["disclaimer"].ToString(),
             logo_pic = reader["logo_pic"].ToString(),
             auth_doc = reader["auth_doc"].ToString(),
             sup_doc1 = reader["sup_doc1"].ToString(),
             sup_doc2 = reader["sup_doc2"].ToString(),
             log_staff = reader["log_staff"].ToString(),
             reg_date = reader["reg_date"].ToString(),
             xvisible = reader["xvisible"].ToString()
         };
         list.Add(item);
     }
     reader.Close();
     return list;
 }
示例#16
0
文件: zues.cs 项目: ozotony/ipocldng
 public List<MarkInfo> getAdminSearchMarkInfoRS(string status, string data_status, string criteria, List<string> fulltext, string dateFrom, string dateTo)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     string cmdText = "";
     string str2 = "";
     string str3 = "";
     string str4 = "";
     int num = 0;
     SqlConnection connection = new SqlConnection(this.Connect());
     if (criteria == "product_title")
     {
         num = fulltext.Count - 1;
         if ((status == "4") && ((data_status == "Refused") || (data_status == "Non-registrable")))
         {
             str2 = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.stage='5' AND pwallet.status='" + status + "' AND ((pwallet.data_status='Non-registrable') OR (pwallet.data_status='Refused'))  AND ";
         }
         else
         {
             str2 = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.stage='5' AND pwallet.status='" + status + "' AND pwallet.data_status='" + data_status + "' AND ";
         }
         for (int i = 0; i < fulltext.Count; i++)
         {
             if (fulltext.Count == 1)
             {
                 str3 = str3 + " ( product_title like '%" + fulltext[i] + "%' ) ";
             }
             else if (num == i)
             {
                 str3 = str3 + " ( product_title like '%" + fulltext[i] + "%' ) ";
             }
             else
             {
                 str3 = str3 + " ( product_title like '%" + fulltext[i] + "%' ) OR";
             }
         }
         str4 = "AND pwallet.reg_date between '" + dateFrom + "' AND '" + dateTo + "'  ORDER BY xID ASC";
         cmdText = str2 + str3 + str4;
     }
     else if (criteria == "app_number")
     {
         if ((status == "4") && ((data_status == "Refused") || (data_status == "Non-registrable")))
         {
             cmdText = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.stage='5' AND pwallet.status='" + status + "' AND ((pwallet.data_status='Non-registrable') OR (pwallet.data_status='Refused')) AND pwallet.validationID like  '%" + fulltext[0] + "%' AND pwallet.reg_date between '" + dateFrom + "' AND '" + dateTo + "'  ORDER BY xID ASC ";
         }
         else
         {
             cmdText = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.stage='5' AND pwallet.status='" + status + "' AND pwallet.data_status='" + data_status + "' AND pwallet.validationID like  '%" + fulltext[0] + "%' AND pwallet.reg_date between '" + dateFrom + "' AND '" + dateTo + "'  ORDER BY xID ASC ";
         }
     }
     SqlCommand command = new SqlCommand(cmdText, connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         MarkInfo info2 = new MarkInfo();
         info2.xID = reader["xID"].ToString();
         info2.reg_number = reader["reg_number"].ToString();
         info2.tm_typeID = reader["tm_typeID"].ToString();
         info2.logo_descriptionID = reader["logo_descriptionID"].ToString();
         info2.national_classID = reader["national_classID"].ToString();
         info2.product_title = reader["product_title"].ToString();
         info2.nice_class = reader["nice_class"].ToString();
         info2.nice_class_desc = reader["nice_class_desc"].ToString();
         info2.sign_type = reader["sign_type"].ToString();
         info2.vienna_class = reader["vienna_class"].ToString();
         info2.disclaimer = reader["disclaimer"].ToString();
         info2.logo_pic = reader["logo_pic"].ToString();
         info2.auth_doc = reader["auth_doc"].ToString();
         info2.sup_doc1 = reader["sup_doc1"].ToString();
         info2.sup_doc2 = reader["sup_doc2"].ToString();
         info2.log_staff = reader["log_staff"].ToString();
         info2.reg_date = reader["reg_date"].ToString();
         info2.xvisible = reader["xvisible"].ToString();
         MarkInfo item = info2;
         list.Add(item);
     }
     reader.Close();
     return list;
 }
示例#17
0
文件: zues.cs 项目: ozotony/ipocldng
 public List<MarkInfo> getCriRegisteredMarkInfoRS(string stage, string data_status)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     string cmdText = "";
     SqlConnection connection = new SqlConnection(this.Connect());
     if (data_status == "Certified")
     {
         cmdText = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.status='" + stage + "' AND ( pwallet.data_status = 'Certified')  ORDER BY xID ASC";
     }
     else if (data_status == "Deferred")
     {
         cmdText = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.status='" + stage + "' AND ( pwallet.data_status = 'Deferred')  ORDER BY xID ASC";
     }
     else if (data_status == "Registered")
     {
         cmdText = "select * from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.status >'" + stage + "' AND pwallet.data_status='" + data_status + "' ORDER BY xID ASC";
     }
     SqlCommand command = new SqlCommand(cmdText, connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         MarkInfo info2 = new MarkInfo();
         info2.xID = reader["xID"].ToString();
         info2.reg_number = reader["reg_number"].ToString();
         info2.tm_typeID = reader["tm_typeID"].ToString();
         info2.logo_descriptionID = reader["logo_descriptionID"].ToString();
         info2.national_classID = reader["national_classID"].ToString();
         info2.product_title = reader["product_title"].ToString();
         info2.nice_class = reader["nice_class"].ToString();
         info2.nice_class_desc = reader["nice_class_desc"].ToString();
         info2.sign_type = reader["sign_type"].ToString();
         info2.vienna_class = reader["vienna_class"].ToString();
         info2.disclaimer = reader["disclaimer"].ToString();
         info2.logo_pic = reader["logo_pic"].ToString();
         info2.auth_doc = reader["auth_doc"].ToString();
         info2.sup_doc1 = reader["sup_doc1"].ToString();
         info2.sup_doc2 = reader["sup_doc2"].ToString();
         info2.log_staff = reader["log_staff"].ToString();
         info2.reg_date = reader["reg_date"].ToString();
         info2.xvisible = reader["xvisible"].ToString();
         MarkInfo item = info2;
         list.Add(item);
     }
     reader.Close();
     return list;
 }
示例#18
0
文件: tm.cs 项目: ozotony/ipocldng
 public string addTrademark(Applicant c_app, MarkInfo c_mark, AddressService c_aos, Representative c_rep, Address c_app_addy, Address c_rep_addy, string pwallet, string log_officer)
 {
     string xID = "";
     this.addApplicant(c_app, c_app_addy, pwallet);
     xID = this.addMark(c_mark, pwallet);
     this.updateMarkReg(xID, c_mark.tm_typeID);
     this.addAos(c_aos, pwallet);
     this.addRepresentative(c_rep, c_rep_addy, pwallet);
     this.updatePwalletStatus(pwallet, log_officer);
     return xID;
 }
示例#19
0
文件: zues.cs 项目: ozotony/ipocldng
 public MarkInfo getMarkInfoByUserID(string ID)
 {
     MarkInfo info = new MarkInfo();
     info.xID = "";
     info.reg_number = "";
     info.tm_typeID = "";
     info.logo_descriptionID = "";
     info.national_classID = "";
     info.product_title = "";
     info.nice_class = "";
     info.nice_class_desc = "";
     info.sign_type = "";
     info.vienna_class = "";
     info.disclaimer = "";
     info.logo_pic = "";
     info.auth_doc = "";
     info.sup_doc1 = "";
     info.sup_doc2 = "";
     info.log_staff = "";
     info.reg_date = "";
     info.xvisible = "";
     SqlConnection connection = new SqlConnection(this.Connect());
     SqlCommand command = new SqlCommand("SELECT * FROM mark_info WHERE xID='" + ID + "' ", connection);
     connection.Open();
     SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader.Read())
     {
         info.xID = reader["xID"].ToString();
         info.reg_number = reader["reg_number"].ToString();
         info.tm_typeID = reader["tm_typeID"].ToString();
         info.logo_descriptionID = reader["logo_descriptionID"].ToString();
         info.national_classID = reader["national_classID"].ToString();
         info.product_title = reader["product_title"].ToString();
         info.nice_class = reader["nice_class"].ToString();
         info.nice_class_desc = reader["nice_class_desc"].ToString();
         info.sign_type = reader["sign_type"].ToString();
         info.vienna_class = reader["vienna_class"].ToString();
         info.disclaimer = reader["disclaimer"].ToString();
         info.logo_pic = reader["logo_pic"].ToString();
         info.auth_doc = reader["auth_doc"].ToString();
         info.sup_doc1 = reader["sup_doc1"].ToString();
         info.sup_doc2 = reader["sup_doc2"].ToString();
         info.log_staff = reader["log_staff"].ToString();
         info.reg_date = reader["reg_date"].ToString();
         info.xvisible = reader["xvisible"].ToString();
     }
     reader.Close();
     return info;
 }
        private static void AssignMarks(LtpCourse course, JsonObject marksObject)
        {
            if (marksObject.GetNamedBoolean("supported") == false)
            {
                course.InternalMarksScored = 0;
                course.TotalMarksTested = 0;
                return;
            }

            double marksScored = 0;
            JsonArray marksArray = marksObject.GetNamedArray("assessments");
            foreach (JsonValue marksValue in marksArray)
            {
                JsonObject markStubObject = marksValue.GetObject();
                string title = markStubObject.GetNamedString("title").ToUpper();
                int maxMarks = (int)markStubObject.GetNamedNumber("max_marks");
                int weightage = (int)markStubObject.GetNamedNumber("weightage");

                MarkInfo markInfo;
                if (markStubObject.GetNamedValue("scored_marks").ValueType == JsonValueType.Null)
                    markInfo = new MarkInfo(course, title, maxMarks, weightage, null, null, "");
                else
                {
                    markInfo = new MarkInfo(course, title, maxMarks, weightage,
                                    null, // currently, 'conducted date' is being skipped.
                                    markStubObject.GetNamedNumber("scored_marks"),
                                    markStubObject.GetNamedString("status").ToUpper());

                    marksScored += (double)markInfo.WeightedMarks;
                    course.TotalMarksTested += markInfo.Weightage;
                }
                course.AddMarkInfo(markInfo);
            }

            course.InternalMarksScored = Math.Round(marksScored, 2);
        }
 internal void AddMarkInfo(MarkInfo markInfo)
 {
     _marksInfo.Add(markInfo);
 }
示例#22
0
文件: index.cs 项目: ozotony/payx
        protected void Page_Load(object sender, EventArgs e)
        {
            kkx = null;

            if ((Session["pwalletID"] != null) && (Session["pwalletID"].ToString() != ""))
            {
                adminID = Session["pwalletID"].ToString();
            }
            else
            {
                Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
            }
            if (Session["fullname"] != null)
            {
                fullname = Session["fullname"].ToString();
            }
            if (Session["email"] != null)
            {
                email = Session["email"].ToString();
            }
            if (Session["mobile"] != null)
            {
                mobile = Session["mobile"].ToString();
            }
            if (Session["cust_id"] != null)
            {
                cust_id = Session["cust_id"].ToString();
            }
            xstring = new StringBuilder();
            product_id = ConfigurationManager.AppSettings["pd_product_id"];
            mackey = ConfigurationManager.AppSettings["pd_mackey"];
            check_trans_page = ConfigurationManager.AppSettings["pd_get_trans_json_page"];
            if ((Request.Form["txnRef"] != null) && (Request.Form["txnRef"] != ""))
            {
                txnref = Request.Form["txnRef"].ToString();
                Session["transID"] = txnref;
            }
            if ((Request.Form["payRef"] != null) && (Request.Form["payRef"] != ""))
            {
                payRef = Request.Form["payRef"].ToString();
            }
            if ((Request.Form["retRef"] != null) && (Request.Form["retRef"] != ""))
            {
                retRef = Request.Form["retRef"].ToString();
            }
            if ((Request.Form["cardNum"] != null) && (Request.Form["cardNum"] != ""))
            {
                cardNum = Request.Form["cardNum"].ToString();
            }
            if ((Request.Form["apprAmt"] != null) && (Request.Form["apprAmt"] != ""))
            {
                apprAmt = Request.Form["apprAmt"].ToString();
            }
            if ((Request.Form["resp"] != null) && (Request.Form["resp"] != ""))
            {
                resp = Request.Form["resp"].ToString();
            }
            if ((Request.Form["desc"] != null) && (Request.Form["desc"] != ""))
            {
                desc = Request.Form["desc"].ToString();
            }
            if (!IsPostBack)
            {
                Session["vitem_code"] = null;
                c_twall = ret.getTwalletByTransIDAdminID(txnref, adminID);
                c_app = ret.getApplicantByID(c_twall.applicantID);
                isw_fields = ret.getISWtransactionByTransactionID(txnref.Trim());
                if (c_twall.xid != null)
                {
                    Session["c_twall"] = c_twall;
                    lt_fdets = ret.getFee_detailsByTwalletID(c_twall.xid);
                    if (lt_fdets.Count > 0)
                    {
                        Session["lt_fdets"] = lt_fdets;
                    }
                    lt_hwall = ret.getHwalletByTransID(txnref);
                    int num = 1;
                    int num2 = 0;
                    XObjs.Registration  c_reg2 = (XObjs.Registration)Session["c_reg"];
                 vid = c_reg2.xid;
                    foreach (XObjs.Hwallet hwallet in lt_hwall)
                    {
                        XObjs.PaymentReciept item = new XObjs.PaymentReciept();
                        XObjs.Fee_list _list = new XObjs.Fee_list();
                        XObjs.Fee_details _details = new XObjs.Fee_details();
                        _details = ret.getFee_detailsByID(hwallet.fee_detailsID);
                        _list = ret.getFee_listByID(_details.fee_listID);
                        item.sn = num.ToString();
                        item.item_code = _list.item_code;

                        if (item.item_code == "AA1")
                        {

                            Session["vitem_code"] = "AA1";
                        }
                        item.item_desc = _list.xdesc;
                        item.init_amt = string.Format("{0:n}", Convert.ToInt32(_details.init_amt));
                        item.tech_amt = string.Format("{0:n}", Convert.ToInt32(_details.tech_amt));
                        item.qty = string.Format("{0:n}", 1);
                        int num3 = Convert.ToInt32(_details.init_amt) + Convert.ToInt32(_details.tech_amt);
                        item.tot_amount = string.Format("{0:n}", num3);
                        item.transID = hwallet.transID + "-" + hwallet.fee_detailsID + "-" + hwallet.xid;
                        num2 += num3;
                        Session["amt"] = num2;
                        total_amt = string.Format("{0:n}", num2 + Math.Round(Convert.ToDouble(isw_fields.isw_conv_fee), 2));
                        Session["total_amt"] = total_amt;
                        lt_pr.Add(item);
                        num++;
                    }
                }
                xstring.AppendLine("Transaction reference= " + txnref + " Payment reference= " + payRef + " Switching Bank Reference number= " + retRef + " card No= " + cardNum + " apprAmt= " + apprAmt);
                inputString = product_id.Trim() + txnref.Trim() + mackey.Trim();
                string headerValue = hash_value.GetGetSHA512String(inputString);

                isr = tx.myRedirect(check_trans_page.Trim() + "?productid=" + product_id.Trim() + "&transactionreference=" + txnref.Trim() + "&amount=" + isw_fields.amount.Trim(), "Hash", headerValue.Trim());

                if (((isr.ResponseCode != "") && (isr.ResponseCode != null)) && (isr.ResponseCode == "00"))
                {
                    err_desc = eh.getErrorDesc(isr.ResponseCode);
                    if (((err_desc != "") && (err_desc != null)) && (err_desc != "NA"))
                    {
                        isr.ResponseDescription = err_desc;
                    }
                    xstring.AppendLine("Sent Amount: " + isw_fields.amount + "\r\n Product ID: " + product_id + "\r\n Hash: " + headerValue + "\r\n Amount: " + isr.Amount + "\r\n CardNumber: " + isr.CardNumber + "\r\n MerchantReference: " + isr.MerchantReference + "\r\n PaymentReference: " + isr.PaymentReference + "\r\n RetrievalReferenceNumber: " + isr.RetrievalReferenceNumber + "\r\n LeadBankCbnCode: " + isr.LeadBankCbnCode + "\r\n TransactionDate: " + isr.TransactionDate + "\r\n ResponseCode: " + isr.ResponseCode + "\r\n ResponseDescription: " + isr.ResponseDescription + "\r\n Json Page: " + check_trans_page + "\r\n Form Response: " + resp + "\r\n Form Description: " + desc);
                    if (txnref != "")
                    {
                        if (Directory.Exists(Server.MapPath("~/") + "InterLogs/"))
                        {
                        docpath = Server.MapPath("~/") + "InterLogs/" + txnref + ".txt";
                        succ = x.WriteToFile(xstring.ToString(), docpath);
                        }
                    }

                    else
                    {
                        if (Directory.Exists(Server.MapPath("~/") + "InterLogs/"))
                        {
                            docpath = Server.MapPath("~/") + "InterLogs/xxx.txt";
                            succ = x.WriteToFile(xstring.ToString(), docpath);
                        }
                    }
                    succ = reg.updateInterSwitchRecords(txnref, payRef, retRef, isr.ResponseCode, isr.TransactionDate, isr.MerchantReference, isr.ResponseDescription,isr.PaymentReference);

                    if (isr.ResponseCode == "00" && (isr.PaymentReference!=null ||isr.PaymentReference!="") )
                    {
                        xpay_status = "1";
                    }
                    else
                    {
                        xpay_status = "3";
                    }
                    reg.updateTwalletPaymentStatus(txnref.Trim(), xpay_status.Trim());
                    if (succ != 0)
                    {
                        if (Session["vitem_code"] != null)
                        {

                            vitem_code = Convert.ToString(Session["vitem_code"]);
                            Retriever kp = new Retriever();
                           // int vmax = kp.getMaxSysId();
                           // vmax=vmax+1;
                           // String vsys_id = "CLD/RA/0" + vmax;

                            Registration dd = new Registration();
                           // dd.updateRegistrationSysID(vid, vsys_id);
                            dd.updateRegistrationSysID2(vid, "Paid");

                       XObjs.Registration ds=kp.getRegistrationByID(vid);
                       sendemail(ds);

                           // Session["cust_id"] = vsys_id;
                            if (Session["cust_id"] != null) {
                            cust_id = Session["cust_id"].ToString();

                            }

                        }

                        if (Session["onlineid"] != null)
                        {
                            Registration dd = new Registration();

                            string dpp = Convert.ToString(Session["onlineid"]);
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(dpp);
                            dd.updateTransID2(dpp.Trim(), txnref.Trim());

                            dd.updateHwallet2(txnref.Trim(), "Used");

                        }

                        if (Session["onlineid2"] != null)
                        {
                            Registration dd = new Registration();
                            string dpp = Convert.ToString(Session["onlineid2"]);
                            dd.updateTransID3(dpp, txnref.Trim());
                            dd.updateHwallet2(txnref.Trim(), "Used");

                        }

                        if (Session["onlineid3"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid3"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Name";

                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);

                        }

                        if (Session["onlineid4"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid4"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Address";

                            dd.updateHwallet2(txnref.Trim(), "Used");

                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid5"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid5"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Agent";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid6"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid6"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Rectification";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid7"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid7"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Assignment";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid8"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid8"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Assignment2";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid9"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid9"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Renewal";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid10"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid10"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "TradeMarkAmendment";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);

                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid12"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid12"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "RegisteredUser";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);

                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        sendAlertHtml();
                    }
                }
                else if (((isr.ResponseCode != "") && (isr.ResponseCode != null)) && (isr.ResponseCode != "00"))
                {
                    err_desc = eh.getErrorDesc(isr.ResponseCode);
                    if (((err_desc != "") && (err_desc != null)) && (err_desc != "NA"))
                    {
                        isr.ResponseDescription = err_desc;
                    }
                    xstring.AppendLine("Sent Amount: " + isw_fields.amount + "\r\n Product ID: " + product_id + "\r\n Hash: " + headerValue + "\r\n Amount: " + isr.Amount + "\r\n CardNumber: " + isr.CardNumber + "\r\n MerchantReference: " + isr.MerchantReference + "\r\n PaymentReference: " + isr.PaymentReference + "\r\n RetrievalReferenceNumber: " + isr.RetrievalReferenceNumber + "\r\n LeadBankCbnCode: " + isr.LeadBankCbnCode + "\r\n TransactionDate: " + isr.TransactionDate + "\r\n ResponseCode: " + isr.ResponseCode + "\r\n ResponseDescription: " + isr.ResponseDescription + "\r\n Json Page: " + check_trans_page + "\r\n Form Response: " + resp + "\r\n Form Description: " + desc);
                    if (txnref != "")
                    {
                        docpath = Server.MapPath("~/") + "InterLogs/" + txnref + ".txt";
                        succ = x.WriteToFile(xstring.ToString(), docpath);
                    }
                    else
                    {
                        docpath = Server.MapPath("~/") + "InterLogs/xxx.txt";
                        succ = x.WriteToFile(xstring.ToString(), docpath);
                    }
                    succ = reg.updateInterSwitchRecords(txnref, payRef, retRef, isr.ResponseCode, isr.TransactionDate, isr.MerchantReference, isr.ResponseDescription,isr.PaymentReference);
                    if (isr.ResponseCode == "00" && (isr.PaymentReference != null || isr.PaymentReference != ""))
                    {
                        xpay_status = "1";
                    }
                    else
                    {
                        xpay_status = "3";
                    }
                    reg.updateTwalletPaymentStatus(txnref.Trim(), xpay_status.Trim());
                    if (succ != 0)
                    {
                        sendUnsuccAlertHtml();
                    }
                }
                else if ((isr.ResponseCode == "") || (isr.ResponseCode == null))
                {
                    string str2 = "None";
                    string str3 = "None";
                    xstring.AppendLine("Sent Amount: " + isw_fields.amount + "\r\n Product ID: " + product_id + "\r\n Hash: " + headerValue + "\r\n Amount: None\r\n CardNumber: None\r\n MerchantReference: None\r\n PaymentReference: None\r\n RetrievalReferenceNumber: None\r\n LeadBankCbnCode: None\r\n TransactionDate: None\r\n ResponseCode: " + str2 + "\r\n ResponseDescription: " + str3 + "\r\n Json Page: " + check_trans_page + "\r\n Form Response: " + resp + "\r\n Form Description: " + desc);
                    if (txnref != "")
                    {
                        docpath = Server.MapPath("~/") + "InterLogs/" + txnref + ".txt";
                        succ = x.WriteToFile(xstring.ToString(), docpath);
                    }
                    else
                    {
                        docpath = Server.MapPath("~/") + "InterLogs/xxx.txt";
                        succ = x.WriteToFile(xstring.ToString(), docpath);
                    }
                    xpay_status = "3";
                    reg.updateTwalletPaymentStatus(txnref, xpay_status);
                    if (desc == "")
                    {
                        isr.ResponseDescription = "Transaction Pending";
                    }
                    else
                    {
                        isr.ResponseDescription = desc;
                    }
                    if (resp == "")
                    {
                        isr.ResponseCode = "XXXX";
                    }
                    else
                    {
                        isr.ResponseCode = resp;
                    }
                    sendUnsuccAlertHtml();
                }
            }
        }
示例#23
0
        /// <summary>
        ///     Search recursively a given method to find whether it or any child call of it meets the specified predication
        /// </summary>
        public bool SearchMethod(SyntaxNodeAnalysisContext context, MethodDeclarationSyntax declare,
                                 Stack <SyntaxNode> callHierarchy, MarkInfo parent = null)
        {
            // =========================================
            // 1. some previous work before checking
            // =========================================

            // retrieve the symbol for the method declaration
            var method = RolsynExtensions.SemanticModelFor(context.SemanticModel, declare)?.GetDeclaredSymbol(declare);

            if (method == null)
            {
                return(false);
            }

            // if parent equals null, this is a starting node of a searching chain, so we reset the cached infomation about the searching stack
            if (parent == null)
            {
                _depth = 1;
                _searchStack.Clear();
                _searchStack.Push(method);
            }
            else
            {
                _depth++;
                _searchStack.Push(method);

                // we do this just in purpose of avoiding the potential probability of endless searching nesting in case of any accidential error occurring,
                // which could throw a StackOverflowException and shut down the application as a severe result.
                if (_depth > 32)
                {
                    Pop();
                    CommonAnalyzer.CommonReport("[UnityEngineAnalyzer] The Stack is ignored for its heavy depth: \n" +
                                                _searchStack.SymbolStackToString());
                    return(false);
                    //throw new Exception("[UnityEngineAnalyzer] The Stack is ignored for its heavy depth: \n" + _searchStack.SymbolStackToString());
                }
            }

            // check declaration exclusion
            if (declare.IsExcluded())
            {
                Pop();
                return(false);
            }

            // make sure the predication is not null
            if (predicate == null)
            {
                Pop();
                return(false);
            }

            // get the hashcode of this method (and check method validation)
            int methodCode = GetMethodHashCode(method);

            if (methodCode == 0)
            {
                Pop();
                return(false);
            }

            // make sure the call hierarchy is not null
            if (callHierarchy == null)
            {
                callHierarchy = new Stack <SyntaxNode>();
            }

            // ==========================================================
            // 2. check the cache dictionary to find out
            //    whether this method is ever checked
            //    and whether the marked infomation is still validate
            // ==========================================================

            // if we have already marked this method, check its syntaxTree to find whether the stored data is out-of-date
            // if not, just return the recorded value
            if (markDict.ContainsKey(methodCode))
            {
                var markInfo = markDict[methodCode];

                if (parent != null && !markInfo.parents.Contains(parent))
                {
                    markInfo.parents.Add(parent);
                }

                // if the stored SyntaxTree doesn't equal to the actual SyntaxTree,
                // we should update the stored data with the newest, setting all its parents as dirty
                if (!MethodHasSameSyntaxTree(method, markInfo.method))
                {
                    //CommonAnalyzer.CommonReport("update: " + method.ToString() + ", " + markInfo.method.GetHashCode() + " -> " + method.GetHashCode());
                    markInfo.Update(method);
                }
                // if the stored data is dirty, which means some of its children has been rebuilt,
                // we should not use the stored data as result directly and should reset this node
                // ( but not update it since it itself is still validate.
                //   if we still update it and set all its parents dirty, we may get stuck in a loop )
                else if (markInfo.dirty)
                {
                    //CommonAnalyzer.CommonReport("dirty: " + method.ToString());
                    markInfo.ResetMark();
                }
                // otherwise we use the stored data as result
                else
                {
                    if (markInfo.mark_value)
                    {
                        foreach (var call in markInfo.callstack)
                        {
                            callHierarchy.Push(call);
                        }
                    }

                    Pop();
                    return(markInfo.mark_value);
                }
            }
            else
            {
                // otherwise we mark this method with a default "false" value, since we might refer back to this method in codes below
                markDict[methodCode] = new MarkInfo(method);
                if (parent != null)
                {
                    markDict[methodCode].parents.Add(parent);
                }
            }


            // ==========================================================
            // 3. if the method is not marked in the cache dictionary,
            //    we check over the expressions within the declaration
            // ==========================================================

            // flag indicating whether we found any qualified node within this method
            SyntaxNode hitNode = null;

            // if the declaration meets the predication, we record it
            var declareSM = RolsynExtensions.SemanticModelFor(context.SemanticModel, declare);

            if (declareSM != null)
            {
                hitNode = predicate(declareSM, declare);
            }


            // ============================================================
            // 4. The last step is to check the declarations recursively
            //    of all the child invocations
            // ============================================================

            if (hitNode == null)
            {
                // if the iteration doesn't break above, meaning this declaration itself doesn't match the predication,
                // so we will check its child invocations.
                var childcalls = declare.DescendantNodes().OfType <InvocationExpressionSyntax>();
                if (childcalls != null)
                {
                    foreach (var childcall in childcalls)
                    {
                        if (childcall.IsExcluded())
                        {
                            continue;
                        }

                        // make sure the invocation is a valid method
                        var childMethodSymbol = declareSM?.GetSymbolInfo(childcall).Symbol as IMethodSymbol;
                        if (childMethodSymbol == null)
                        {
                            continue;
                        }

                        var childDeclare = childMethodSymbol.GetMethodDeclaration();
                        if (childDeclare == null)
                        {
                            continue;
                        }

                        // check the state this child invocation is marked as
                        var ret = SearchMethod(context, childDeclare, callHierarchy, markDict[methodCode]);

                        // if this child invocation is marked as "true", then record it and break.
                        if (ret)
                        {
                            hitNode = childcall;
                            break;
                        }
                    }
                }
            }

            // if this method is qualified, update the hierarchy stack and return
            if (hitNode != null)
            {
                callHierarchy.Push(hitNode);
                markDict[methodCode].Mark(callHierarchy);
            }

            Pop();
            return(hitNode != null);
        }
示例#24
0
文件: zues.cs 项目: ozotony/ipocldng
 public List<MarkInfo> getMarkInfoRSX(string status, string data_status, string start, string limit)
 {
     List<MarkInfo> list = new List<MarkInfo>();
     new MarkInfo();
     SqlConnection connection = new SqlConnection(this.Connect());
     if ((status == "4") && ((data_status == "Refused") || (data_status == "Non-registrable")))
     {
         SqlCommand command = new SqlCommand("WITH RSTbl AS (select mark_info.xID,mark_info.reg_number,mark_info.product_title,mark_info.tm_typeID,mark_info.reg_date,mark_info.log_staff, ROW_NUMBER() OVER (ORDER BY mark_info.xID) AS 'RowRank' from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.stage='5' AND pwallet.status='" + status + "' AND ((pwallet.data_status='Non-registrable') OR (pwallet.data_status='Refused')) )SELECT * FROM RSTbl  WHERE RowRank BETWEEN '" + start + "' AND '" + limit + "' ", connection);
         connection.Open();
         SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
         while (reader.Read())
         {
             MarkInfo info2 = new MarkInfo();
             info2.xID = reader["xID"].ToString();
             info2.reg_number = reader["reg_number"].ToString();
             info2.tm_typeID = reader["tm_typeID"].ToString();
             info2.product_title = reader["product_title"].ToString();
             info2.log_staff = reader["log_staff"].ToString();
             info2.reg_date = reader["reg_date"].ToString();
             MarkInfo item = info2;
             list.Add(item);
         }
         reader.Close();
         return list;
     }
     SqlCommand command2 = new SqlCommand("WITH RSTbl AS (select mark_info.xID,mark_info.reg_number,mark_info.product_title,mark_info.tm_typeID,mark_info.reg_date,mark_info.log_staff, ROW_NUMBER() OVER (ORDER BY mark_info.xID) AS 'RowRank' from mark_info LEFT OUTER JOIN pwallet ON mark_info.log_staff=pwallet.ID WHERE pwallet.stage='5' AND pwallet.status='" + status + "' AND pwallet.data_status='" + data_status + "' )SELECT * FROM RSTbl  WHERE RowRank BETWEEN '" + start + "' AND '" + limit + "' ", connection);
     connection.Open();
     SqlDataReader reader2 = command2.ExecuteReader(CommandBehavior.CloseConnection);
     while (reader2.Read())
     {
         MarkInfo info4 = new MarkInfo();
         info4.xID = reader2["xID"].ToString();
         info4.reg_number = reader2["reg_number"].ToString();
         info4.tm_typeID = reader2["tm_typeID"].ToString();
         info4.product_title = reader2["product_title"].ToString();
         info4.log_staff = reader2["log_staff"].ToString();
         info4.reg_date = reader2["reg_date"].ToString();
         MarkInfo info3 = info4;
         list.Add(info3);
     }
     reader2.Close();
     return list;
 }